From: Pierre-Louis Bossart Date: Thu, 16 Jun 2022 22:04:23 +0000 (-0500) Subject: ASoC: fsl: fsl_sai: use pm_runtime_resume_and_get() X-Git-Tag: v6.1~812^2~8^2~37^2~64^2~4 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=37cb8a58013fc6ca2febaed355f6559012699542;p=mirror_ubuntu-kernels.git ASoC: fsl: fsl_sai: use pm_runtime_resume_and_get() Simplify the flow. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Cezary Rojewski Link: https://lore.kernel.org/r/20220616220427.136036-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 4f5bd9597c74..b6407d4d3e09 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);