From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
snd_soc_component and snd_soc_component_driver both have controls/num_controls, but these are duplicated. Let's remove duplicated definition.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- v1 -> v2
- based on mark/topic/core
include/sound/soc.h | 2 -- sound/soc/soc-core.c | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h index df819f7..5d792e49 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -862,8 +862,6 @@ struct snd_soc_component { /* Don't use these, use snd_soc_component_get_dapm() */ struct snd_soc_dapm_context dapm;
- const struct snd_kcontrol_new *controls; - unsigned int num_controls; const struct snd_soc_dapm_widget *dapm_widgets; unsigned int num_dapm_widgets; const struct snd_soc_dapm_route *dapm_routes; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 6fab0ff..8030da5 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1555,9 +1555,10 @@ static int soc_probe_component(struct snd_soc_card *card, } }
- if (component->controls) - snd_soc_add_component_controls(component, component->controls, - component->num_controls); + if (component->driver->controls) + snd_soc_add_component_controls(component, + component->driver->controls, + component->driver->num_controls); if (component->dapm_routes) snd_soc_dapm_add_routes(dapm, component->dapm_routes, component->num_dapm_routes); @@ -3229,8 +3230,6 @@ static int snd_soc_component_initialize(struct snd_soc_component *component, if (driver->stream_event) dapm->stream_event = snd_soc_component_stream_event;
- component->controls = driver->controls; - component->num_controls = driver->num_controls; component->dapm_widgets = driver->dapm_widgets; component->num_dapm_widgets = driver->num_dapm_widgets; component->dapm_routes = driver->dapm_routes;