linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
@ 2022-04-12  8:30 cgel.zte
  2022-04-12 12:47 ` Shengjiu Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: cgel.zte @ 2022-04-12  8:30 UTC (permalink / raw)
  To: shengjiu.wang
  Cc: alsa-devel, Xiubo.Lee, linuxppc-dev, Zeal Robot, lgirdwood,
	Minghao Chi, linux-kernel, nicoleotsuka, broonie, festevam

From: Minghao Chi <chi.minghao@zte.com.cn>

Using pm_runtime_resume_and_get is more appropriate
for simplifing code

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-20  7:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-12  8:30 [PATCH] ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync cgel.zte
2022-04-12 12:47 ` Shengjiu Wang
2022-04-12 19:50 ` Mark Brown
2022-04-20  7:48 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).