mailbox:imx: using pm_runtime_resume_and_get
authorran jianping <ran.jianping@zte.com.cn>
Wed, 27 Apr 2022 05:41:00 +0000 (05:41 +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/imx-mailbox.c

index df8a785..b10239d 100644 (file)
@@ -830,11 +830,9 @@ static int imx_mu_probe(struct platform_device *pdev)
 
        pm_runtime_enable(dev);
 
-       ret = pm_runtime_get_sync(dev);
-       if (ret < 0) {
-               pm_runtime_put_noidle(dev);
+       ret = pm_runtime_resume_and_get(dev);
+       if (ret < 0)
                goto disable_runtime_pm;
-       }
 
        ret = pm_runtime_put_sync(dev);
        if (ret < 0)