]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ASoC: remove duplicate definition of dapm_widgets/num_dapm_widgets
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 25 Aug 2017 00:29:20 +0000 (00:29 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 25 Aug 2017 13:58:49 +0000 (14:58 +0100)
snd_soc_component and snd_soc_component_driver both have
dapm_widgets/num_dapm_widgets, 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 e4b4746032ba84550e01b9518af1da8b8c6e358e..3e0070ed68837a1077ac994e21dc50c4c5e77374 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_soc_dapm_widget *dapm_widgets;
-       unsigned int num_dapm_widgets;
        const struct snd_soc_dapm_route *dapm_routes;
        unsigned int num_dapm_routes;
        struct snd_soc_codec *codec;
index 1317706f8e69fb5c45c5c9aab69c33f13fb233c4..3a3236dc996d537f97654396a6eaa37497715795 100644 (file)
@@ -1451,9 +1451,10 @@ static int soc_probe_component(struct snd_soc_card *card,
 
        soc_init_component_debugfs(component);
 
-       if (component->dapm_widgets) {
-               ret = snd_soc_dapm_new_controls(dapm, component->dapm_widgets,
-                       component->num_dapm_widgets);
+       if (component->driver->dapm_widgets) {
+               ret = snd_soc_dapm_new_controls(dapm,
+                                       component->driver->dapm_widgets,
+                                       component->driver->num_dapm_widgets);
 
                if (ret != 0) {
                        dev_err(component->dev,
@@ -3185,8 +3186,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->dapm_widgets = driver->dapm_widgets;
-       component->num_dapm_widgets = driver->num_dapm_widgets;
        component->dapm_routes = driver->dapm_routes;
        component->num_dapm_routes = driver->num_dapm_routes;