From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
This patch moves snd_soc_component_set_bias_level() to soc-component.c It will be used at soc-dapm.c :: snd_soc_dapm_force_bias_level(), but no effect by this patch.
int snd_soc_dapm_force_bias_level(...) { => int ret = 0;
=> if (dapm->set_bias_level) => ret = dapm->set_bias_level(dapm, level); ... }
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc-component.h | 2 ++ sound/soc/soc-component.c | 10 ++++++++++ sound/soc/soc-core.c | 11 +---------- 3 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h index 8c88058..7c9ae25 100644 --- a/include/sound/soc-component.h +++ b/include/sound/soc-component.h @@ -278,6 +278,8 @@ void snd_soc_component_seq_notifier(struct snd_soc_dapm_context *dapm, enum snd_soc_dapm_type type, int subseq); int snd_soc_component_stream_event(struct snd_soc_dapm_context *dapm, int event); +int snd_soc_component_set_bias_level(struct snd_soc_dapm_context *dapm, + enum snd_soc_bias_level level);
#ifdef CONFIG_REGMAP void snd_soc_component_init_regmap(struct snd_soc_component *component, diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index ab8e7cc..b7a7ec7 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -71,6 +71,16 @@ int snd_soc_component_stream_event(struct snd_soc_dapm_context *dapm, return 0; }
+int snd_soc_component_set_bias_level(struct snd_soc_dapm_context *dapm, + enum snd_soc_bias_level level) +{ + struct snd_soc_component *component = dapm->component; + + if (component->driver->set_bias_level) + return component->driver->set_bias_level(component, level); + return 0; +} + int snd_soc_component_enable_pin(struct snd_soc_component *component, const char *pin) { diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 6f7de6a..112bde1 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2692,14 +2692,6 @@ int snd_soc_register_dai(struct snd_soc_component *component, } EXPORT_SYMBOL_GPL(snd_soc_register_dai);
-static int snd_soc_component_set_bias_level(struct snd_soc_dapm_context *dapm, - enum snd_soc_bias_level level) -{ - struct snd_soc_component *component = dapm->component; - - return component->driver->set_bias_level(component, level); -} - static int snd_soc_component_initialize(struct snd_soc_component *component, const struct snd_soc_component_driver *driver, struct device *dev) { @@ -2722,8 +2714,7 @@ static int snd_soc_component_initialize(struct snd_soc_component *component, dapm->suspend_bias_off = driver->suspend_bias_off; dapm->seq_notifier = snd_soc_component_seq_notifier; dapm->stream_event = snd_soc_component_stream_event; - if (driver->set_bias_level) - dapm->set_bias_level = snd_soc_component_set_bias_level; + dapm->set_bias_level = snd_soc_component_set_bias_level;
INIT_LIST_HEAD(&component->dai_list); mutex_init(&component->io_mutex);