Commit 08fc2a74 authored by Zhang Qilong's avatar Zhang Qilong Committed by Mark Brown

ASoC: soc-component: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

Using the newest pm_runtime_resume_and_get is more appropriate
for simplifing code here.
Signed-off-by: default avatarZhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20220922145846.114312-1-zhangqilong3@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 76003e4d
......@@ -1213,11 +1213,9 @@ int snd_soc_pcm_component_pm_runtime_get(struct snd_soc_pcm_runtime *rtd,
int i;
for_each_rtd_components(rtd, i, component) {
int ret = pm_runtime_get_sync(component->dev);
if (ret < 0 && ret != -EACCES) {
pm_runtime_put_noidle(component->dev);
int ret = pm_runtime_resume_and_get(component->dev);
if (ret < 0 && ret != -EACCES)
return soc_component_ret(component, ret);
}
/* mark stream if succeeded */
soc_component_mark_push(component, stream, pm);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment