summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2017-08-25 00:29:01 +0000
committerMark Brown <broonie@kernel.org>2017-08-25 14:58:44 +0100
commitb8972bf0521ca7ee3c8d27da0fd101fe648acfc2 (patch)
tree5c29c9f54fc2551af76efc41fd318710dc18a232 /sound
parent21a035287e28ec225fe7dfd1fffc509efd26a5db (diff)
downloadlinux-b8972bf0521ca7ee3c8d27da0fd101fe648acfc2.tar.bz2
ASoC: remove duplicate definition of controls/num_controls
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> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-core.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 3bb8c63564cf..1317706f8e69 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1495,9 +1495,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);
@@ -3184,8 +3185,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;