ASoC: remove duplicate definition of controls/num_controls
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 25 Aug 2017 00:29:01 +0000 (00:29 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 25 Aug 2017 13:58:44 +0000 (14:58 +0100)
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>
include/sound/soc.h
sound/soc/soc-core.c

index de57a8ad057b8f1e334dd68938cc585f68ab1118..e4b4746032ba84550e01b9518af1da8b8c6e358e 100644 (file)
@@ -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;
index 3bb8c63564cfba66e3f0f6de4caf9db2c45347d1..1317706f8e69fb5c45c5c9aab69c33f13fb233c4 100644 (file)
@@ -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;