From: ran jianping Date: Thu, 28 Apr 2022 06:42:09 +0000 (+0000) Subject: mailbox: omap: using pm_runtime_resume_and_get to simplify the code X-Git-Tag: v5.19-rc1~133^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d9512696082bcfd068ce65476c85c5b17511d4df;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: ran jianping Signed-off-by: Jassi Brar --- diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index 58f3d569f095b..098c82d871371 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