diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-07-26 07:51:08 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-08-05 18:20:51 +0300 |
commit | 9a840cbac77a90e8406296aaa132ebf2c84ed9e3 (patch) | |
tree | f5eaa3105e6e4b43d9be8153f8e0ae7675466bf3 /sound/soc/soc-component.c | |
parent | 66c51573b89d0a5c1089139a2f0dd029a755c37d (diff) | |
download | linux-9a840cbac77a90e8406296aaa132ebf2c84ed9e3.tar.xz |
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.c | 7 |
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; +} |