summaryrefslogtreecommitdiffstats
path: root/drivers/mailbox
diff options
context:
space:
mode:
authorran jianping <ran.jianping@zte.com.cn>2022-04-28 08:42:09 +0200
committerJassi Brar <jaswinder.singh@linaro.org>2022-05-21 18:41:30 +0200
commitd9512696082bcfd068ce65476c85c5b17511d4df (patch)
treeda6ea4fc5181d0c8d4fdf431d30f687162911b5d /drivers/mailbox
parentmailbox:imx: using pm_runtime_resume_and_get (diff)
downloadlinux-d9512696082bcfd068ce65476c85c5b17511d4df.tar.xz
linux-d9512696082bcfd068ce65476c85c5b17511d4df.zip
mailbox: omap: using pm_runtime_resume_and_get to simplify the code
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>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r--drivers/mailbox/omap-mailbox.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
index 58f3d569f095..098c82d87137 100644
--- a/drivers/mailbox/omap-mailbox.c
+++ b/drivers/mailbox/omap-mailbox.c
@@ -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