2022-06-16 22:36:55

by Pierre-Louis Bossart

[permalink] [raw]
Subject: [PATCH 07/11] ASoC: fsl: fsl_sai: use pm_runtime_resume_and_get()

Simplify the flow.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
Reviewed-by: Bard Liao <[email protected]>
Reviewed-by: Kai Vehmanen <[email protected]>
Reviewed-by: Ranjani Sridharan <[email protected]>
---
sound/soc/fsl/fsl_sai.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 4f5bd9597c746..b6407d4d3e09d 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -1141,11 +1141,9 @@ static int fsl_sai_probe(struct platform_device *pdev)
goto err_pm_disable;
}

- 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 err_pm_get_sync;
- }

/* Get sai version */
ret = fsl_sai_check_version(dev);
--
2.34.1