]> git.ipfire.org Git - people/ms/linux.git/commitdiff
mailbox: omap: using pm_runtime_resume_and_get to simplify the code
authorran jianping <ran.jianping@zte.com.cn>
Thu, 28 Apr 2022 06:42:09 +0000 (06:42 +0000)
committerJassi Brar <jaswinder.singh@linaro.org>
Sat, 21 May 2022 16:41:30 +0000 (11:41 -0500)
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ran jianping <ran.jianping@zte.com.cn>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/omap-mailbox.c

index 58f3d569f095b1eaaeb13972aed24df66bf2c3fd..098c82d871371b9ca9ce6c41a52520867c8a1481 100644 (file)
@@ -856,11 +856,9 @@ static int omap_mbox_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, mdev);
        pm_runtime_enable(mdev->dev);
 
-       ret = pm_runtime_get_sync(mdev->dev);
-       if (ret < 0) {
-               pm_runtime_put_noidle(mdev->dev);
+       ret = pm_runtime_resume_and_get(mdev->dev);
+       if (ret < 0)
                goto unregister;
-       }
 
        /*
         * just print the raw revision register, the format is not