diff mbox series

scsi: ufs: core: Use proper power management API

Message ID 20230411025007epcms2p17ffdb87332484608daf446c7fde6ceac@epcms2p1 (mailing list archive)
State Deferred
Headers show
Series scsi: ufs: core: Use proper power management API | expand

Commit Message

Keoseong Park April 11, 2023, 2:50 a.m. UTC
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 <keosung.park@samsung.com>
---
 drivers/ufs/core/ufs-sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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));