aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-component.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-07-26 13:51:08 +0900
committerMark Brown <broonie@kernel.org>2019-08-05 16:20:51 +0100
commit9a840cbac77a90e8406296aaa132ebf2c84ed9e3 (patch)
treef5eaa3105e6e4b43d9be8153f8e0ae7675466bf3 /sound/soc/soc-component.c
parentASoC: soc-component: add snd_soc_component_suspend() (diff)
downloadlinux-dev-9a840cbac77a90e8406296aaa132ebf2c84ed9e3.tar.xz
linux-dev-9a840cbac77a90e8406296aaa132ebf2c84ed9e3.zip
ASoC: soc-component: add snd_soc_component_resume()
Current ALSA SoC is directly using component->driver->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_resume() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/875znp5rm2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-component.c')
-rw-r--r--sound/soc/soc-component.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index f0e63cd991c8..cbae7672b72d 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -354,3 +354,10 @@ void snd_soc_component_suspend(struct snd_soc_component *component)
component->driver->suspend(component);
component->suspended = 1;
}
+
+void snd_soc_component_resume(struct snd_soc_component *component)
+{
+ if (component->driver->resume)
+ component->driver->resume(component);
+ component->suspended = 0;
+}