summaryrefslogtreecommitdiff
path: root/drivers/bus/ti-sysc.c
diff options
context:
space:
mode:
authorZhang Qilong <zhangqilong3@huawei.com>2021-05-31 22:25:42 +0800
committerTony Lindgren <tony@atomide.com>2021-06-11 10:24:26 +0300
commitcea08169ad4ce46c222a223d8f71db6d9c3f1385 (patch)
treeb1a6af6bc1087d8b4f885c0c3ccc20283882502c /drivers/bus/ti-sysc.c
parent4e0018530c2edc5846a737222059661a2ae77522 (diff)
bus: ti-sysc: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Using pm_runtime_resume_and_get is more appropriate for simplifing code. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/bus/ti-sysc.c')
-rw-r--r--drivers/bus/ti-sysc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index c2e3b1c9d7af..9df1e674d3f2 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -3111,9 +3111,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;
}
@@ -3171,9 +3170,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;
}