Thread (4 messages) 4 messages, 4 authors, 2022-04-20

Re: [PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

From: Shengjiu Wang <shengjiu.wang@gmail.com>
Date: 2022-04-12 22:10:55
Also in: alsa-devel

On Tue, Apr 12, 2022 at 4:30 PM [off-list ref] wrote:
From: Minghao Chi <redacted>

Using pm_runtime_resume_and_get is more appropriate
for simplifing code

Reported-by: Zeal Robot <redacted>
Signed-off-by: Minghao Chi <redacted>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>

Best regards
Wang Shengjiu
quoted hunk ↗ jump to hunk
---
 sound/soc/fsl/fsl_esai.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index ed444e8f1d6b..1a2bdf8e76f0 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -1050,11 +1050,9 @@ static int fsl_esai_probe(struct platform_device
*pdev)
                        goto err_pm_disable;
        }

-       ret = pm_runtime_get_sync(&pdev->dev);
-       if (ret < 0) {
-               pm_runtime_put_noidle(&pdev->dev);
+       ret = pm_runtime_resume_and_get(&pdev->dev);
+       if (ret < 0)
                goto err_pm_get_sync;
-       }

        ret = fsl_esai_hw_init(esai_priv);
        if (ret)
--
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help