mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
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>
This commit is contained in:
parent
5068406006
commit
c721905c54
1 changed files with 2 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue