aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/soc-component.c
diff options
context:
space:
mode:
authorZhang Qilong <zhangqilong3@huawei.com>2022-09-22 22:58:46 +0800
committerMark Brown <broonie@kernel.org>2022-09-23 17:54:13 +0100
commit08fc2a7448afc1660ec2f1b5c437fcd14155a7ee (patch)
tree14b991c6f7599ed9d388b127febdb47001f66944 /sound/soc/soc-component.c
parentASoC: SOF: Intel: MTL: Fixes for suspend/resume (diff)
downloadwireguard-linux-08fc2a7448afc1660ec2f1b5c437fcd14155a7ee.tar.xz
wireguard-linux-08fc2a7448afc1660ec2f1b5c437fcd14155a7ee.zip
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: Zhang Qilong <zhangqilong3@huawei.com> Link: https://lore.kernel.org/r/20220922145846.114312-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-component.c')
-rw-r--r--sound/soc/soc-component.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index e12f8244242b..659b9ade4158 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -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);
}