提交 cea08169 编写于 作者: Z Zhang Qilong 提交者: Tony Lindgren

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: NZhang Qilong <zhangqilong3@huawei.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 4e001853
...@@ -3111,9 +3111,8 @@ static int sysc_probe(struct platform_device *pdev) ...@@ -3111,9 +3111,8 @@ static int sysc_probe(struct platform_device *pdev)
goto unprepare; goto unprepare;
pm_runtime_enable(ddata->dev); pm_runtime_enable(ddata->dev);
error = pm_runtime_get_sync(ddata->dev); error = pm_runtime_resume_and_get(ddata->dev);
if (error < 0) { if (error < 0) {
pm_runtime_put_noidle(ddata->dev);
pm_runtime_disable(ddata->dev); pm_runtime_disable(ddata->dev);
goto unprepare; goto unprepare;
} }
...@@ -3171,9 +3170,8 @@ static int sysc_remove(struct platform_device *pdev) ...@@ -3171,9 +3170,8 @@ static int sysc_remove(struct platform_device *pdev)
cancel_delayed_work_sync(&ddata->idle_work); 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) { if (error < 0) {
pm_runtime_put_noidle(ddata->dev);
pm_runtime_disable(ddata->dev); pm_runtime_disable(ddata->dev);
goto unprepare; goto unprepare;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册