ASoC: remove duplicate definition of dapm_routes/num_dapm_routes
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 25 Aug 2017 00:29:41 +0000 (00:29 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 25 Aug 2017 13:59:38 +0000 (14:59 +0100)
snd_soc_component and snd_soc_component_driver both have
dapm_routes/num_dapm_routes, 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 3e0070ed68837a1077ac994e21dc50c4c5e77374..2bcb38045dc1261abea78720dda304b363833dfa 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_route *dapm_routes;
-       unsigned int num_dapm_routes;
        struct snd_soc_codec *codec;
 
        int (*probe)(struct snd_soc_component *);
index 3a3236dc996d537f97654396a6eaa37497715795..b8f96a41b59408971497e5e5d5021ecc21330406 100644 (file)
@@ -1500,9 +1500,10 @@ static int soc_probe_component(struct snd_soc_card *card,
                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);
+       if (component->driver->dapm_routes)
+               snd_soc_dapm_add_routes(dapm,
+                                       component->driver->dapm_routes,
+                                       component->driver->num_dapm_routes);
 
        list_add(&dapm->list, &card->dapm_list);
        list_add(&component->card_list, &card->component_dev_list);
@@ -3186,9 +3187,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_routes = driver->dapm_routes;
-       component->num_dapm_routes = driver->num_dapm_routes;
-
        INIT_LIST_HEAD(&component->dai_list);
        mutex_init(&component->io_mutex);