summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_esai.c
diff options
context:
space:
mode:
authorMinghao Chi <chi.minghao@zte.com.cn>2022-04-12 11:30:00 +0300
committerMark Brown <broonie@kernel.org>2022-04-12 19:17:18 +0300
commitc721905c54d913db0102973dbcdfb48d91146a2d (patch)
tree156a14a838146e05ea4ce8399c9794207450c2c1 /sound/soc/fsl/fsl_esai.c
parent506840600613027f139d30447a2c27ec8088c698 (diff)
downloadlinux-c721905c54d913db0102973dbcdfb48d91146a2d.tar.xz
ASoC: fsl: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
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> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220412083000.2532711-1-chi.minghao@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/fsl/fsl_esai.c')
-rw-r--r--sound/soc/fsl/fsl_esai.c6
1 files 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)