summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-component.c7
-rw-r--r--sound/soc/soc-core.c4
2 files changed, 8 insertions, 3 deletions
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index cf0d20a877e6..f0e63cd991c8 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -347,3 +347,10 @@ int snd_soc_component_trigger(struct snd_soc_component *component,
return 0;
}
+
+void snd_soc_component_suspend(struct snd_soc_component *component)
+{
+ if (component->driver->suspend)
+ component->driver->suspend(component);
+ component->suspended = 1;
+}
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 9ba19efcc56c..855b19abc1d2 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -520,9 +520,7 @@ int snd_soc_suspend(struct device *dev)
/* fall through */
case SND_SOC_BIAS_OFF:
- if (component->driver->suspend)
- component->driver->suspend(component);
- component->suspended = 1;
+ snd_soc_component_suspend(component);
if (component->regmap)
regcache_mark_dirty(component->regmap);
/* deactivate pins to sleep state */