lkml.org 
[lkml]   [2022]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/11] ASoC: soc-component: use pm_runtime_resume_and_get()
Date
simplify the flow. No functionality change, except that on -EACCESS
the reference count will be decreased.

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>
---
sound/soc/soc-component.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index e12f8244242b9..cb92e002c38bc 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -1213,11 +1213,11 @@ 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);
}
--
2.34.1
\
 
 \ /
  Last update: 2022-06-17 00:06    [W:0.083 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site