2023-04-11 02:56:56

by Keoseong Park

[permalink] [raw]
Subject: [PATCH] scsi: ufs: core: Use proper power management API

Commit b294ff3e3449 ("scsi: ufs: core: Enable power management for wlun")
modified the driver core to use ufshcd_rpm_{get,put}_sync() APIs.

Switch to these APIs in sysfs as well.

Signed-off-by: Keoseong Park <[email protected]>
---
drivers/ufs/core/ufs-sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ufs/core/ufs-sysfs.c b/drivers/ufs/core/ufs-sysfs.c
index 883f0e44b54e..b683a43ea089 100644
--- a/drivers/ufs/core/ufs-sysfs.c
+++ b/drivers/ufs/core/ufs-sysfs.c
@@ -167,11 +167,11 @@ static ssize_t auto_hibern8_show(struct device *dev,
goto out;
}

- pm_runtime_get_sync(hba->dev);
+ ufshcd_rpm_get_sync(hba);
ufshcd_hold(hba, false);
ahit = ufshcd_readl(hba, REG_AUTO_HIBERNATE_IDLE_TIMER);
ufshcd_release(hba);
- pm_runtime_put_sync(hba->dev);
+ ufshcd_rpm_put_sync(hba);

ret = sysfs_emit(buf, "%d\n", ufshcd_ahit_to_us(ahit));

--
2.17.1