]> Git Repo - linux.git/commitdiff
bus: ti-sysc: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
authorZhang Qilong <[email protected]>
Mon, 31 May 2021 14:25:42 +0000 (22:25 +0800)
committerTony Lindgren <[email protected]>
Fri, 11 Jun 2021 07:24:26 +0000 (10:24 +0300)
Using pm_runtime_resume_and_get is more appropriate
for simplifing code.

Signed-off-by: Zhang Qilong <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
drivers/bus/ti-sysc.c

index c2e3b1c9d7afb538898b31aa53dd8f803dc194c9..9df1e674d3f2af3aa96d10786273f4dc3e7c4988 100644 (file)
@@ -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;
        }
This page took 0.059539 seconds and 4 git commands to generate.