summaryrefslogtreecommitdiffstats
path: root/drivers/mailbox/imx-mailbox.c
diff options
context:
space:
mode:
authorran jianping <ran.jianping@zte.com.cn>2022-04-27 07:41:00 +0200
committerJassi Brar <jaswinder.singh@linaro.org>2022-05-21 18:41:30 +0200
commit504ff5b00853b05133c9cddfc351548b48cc5bdc (patch)
tree432ebaf3aaacb9999e8274cfb3e04ba3aeb6e1e0 /drivers/mailbox/imx-mailbox.c
parentmailbox: mediatek: support mt8186 adsp mailbox (diff)
downloadlinux-504ff5b00853b05133c9cddfc351548b48cc5bdc.tar.xz
linux-504ff5b00853b05133c9cddfc351548b48cc5bdc.zip
mailbox:imx: using pm_runtime_resume_and_get
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/imx-mailbox.c')
-rw-r--r--drivers/mailbox/imx-mailbox.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index df8a785be324..b10239d6ef93 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -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)