diff mbox series

[-next] bus: ti-sysc: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

Message ID 20210531142542.31158-1-zhangqilong3@huawei.com (mailing list archive)
State New
Headers show
Series [-next] bus: ti-sysc: using pm_runtime_resume_and_get instead of pm_runtime_get_sync | expand

Commit Message

Zhang Qilong May 31, 2021, 2:25 p.m. UTC
Using pm_runtime_resume_and_get is more appropriate
for simplifing code.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
 drivers/bus/ti-sysc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Tony Lindgren June 11, 2021, 7:24 a.m. UTC | #1
* Zhang Qilong <zhangqilong3@huawei.com> [210531 17:11]:
> Using pm_runtime_resume_and_get is more appropriate
> for simplifing code.

Thanks applying into omap-for-v5.14/ti-sysc.

Tony
diff mbox series

Patch

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 5fae60f8c135..705e2ea273f9 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -3061,9 +3061,8 @@  static int sysc_probe(struct platform_device *pdev)
 		goto unprepare;
 
 	pm_runtime_enable(ddata->dev);
-	error = pm_runtime_get_sync(ddata->dev);
+	error = pm_runtime_resume_and_get(ddata->dev);
 	if (error < 0) {
-		pm_runtime_put_noidle(ddata->dev);
 		pm_runtime_disable(ddata->dev);
 		goto unprepare;
 	}
@@ -3117,9 +3116,8 @@  static int sysc_remove(struct platform_device *pdev)
 
 	cancel_delayed_work_sync(&ddata->idle_work);
 
-	error = pm_runtime_get_sync(ddata->dev);
+	error = pm_runtime_resume_and_get(ddata->dev);
 	if (error < 0) {
-		pm_runtime_put_noidle(ddata->dev);
 		pm_runtime_disable(ddata->dev);
 		goto unprepare;
 	}