ASoC: fsl: fsl_sai: use pm_runtime_resume_and_get()
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 16 Jun 2022 22:04:23 +0000 (17:04 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 27 Jun 2022 12:17:57 +0000 (13:17 +0100)
Simplify the flow.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220616220427.136036-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_sai.c

index 4f5bd95..b6407d4 100644 (file)
@@ -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);