ASoC: soc-pcm: call snd_soc_component_open/close() once
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 10 Feb 2020 03:14:37 +0000 (12:14 +0900)
committerMark Brown <broonie@kernel.org>
Wed, 12 Feb 2020 23:51:36 +0000 (23:51 +0000)
commitdd03907bf129b42e9e3203fdf405ea9873b28dd3
treeac89a5bd09b65a3f91c4abdce6ba181e8c5f8993
parent514de1c935d1670e0f162210f3794cf0be67c8a7
ASoC: soc-pcm: call snd_soc_component_open/close() once

Current soc_pcm_open() calls snd_soc_component_open() under loop.
Thus, it needs to care about opened/not-yet-opened Component.

But, if soc-component.c is handling it, soc-pcm.c don't need to care
about it.
This patch adds opened flag to soc-component.h, and simplify soc-pcm.c.
This is one of prepare for cleanup soc-pcm-open()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/874kvzcey1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-component.h
sound/soc/soc-component.c
sound/soc/soc-pcm.c