ASoC: soc-card: move snd_soc_card_get_kcontrol() to soc-card
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 28 May 2020 01:47:56 +0000 (10:47 +0900)
committerMark Brown <broonie@kernel.org>
Sat, 30 May 2020 01:11:27 +0000 (02:11 +0100)
Card related function should be implemented at soc-card now.
This patch moves it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87a71s25kj.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-card.h
include/sound/soc.h
sound/soc/soc-card.c
sound/soc/soc-core.c

index 997809bb3afb25bcac7a48f16909b13ba954951f..c601eddf0975f2ab64af9e6e6eec5ab10a70e4cd 100644 (file)
@@ -8,4 +8,7 @@
 #ifndef __SOC_CARD_H
 #define __SOC_CARD_H
 
+struct snd_kcontrol *snd_soc_card_get_kcontrol(struct snd_soc_card *soc_card,
+                                              const char *name);
+
 #endif /* __SOC_CARD_H */
index 5b880e29d1067ed9274eaa8de53be5c921b0e28f..f93827c6be510fcb4c75546f8067b8aff94ea26a 100644 (file)
@@ -582,8 +582,6 @@ static inline int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops)
 struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template,
                                  void *data, const char *long_name,
                                  const char *prefix);
-struct snd_kcontrol *snd_soc_card_get_kcontrol(struct snd_soc_card *soc_card,
-                                              const char *name);
 int snd_soc_add_component_controls(struct snd_soc_component *component,
        const struct snd_kcontrol_new *controls, unsigned int num_controls);
 int snd_soc_add_card_controls(struct snd_soc_card *soc_card,
index 4bc6f26ea8cb9490ff955b69dc10efc1c3399095..340ab682cc763bde8b84a9e1b5c94e9b01bf8854 100644 (file)
@@ -24,3 +24,19 @@ static inline int _soc_card_ret(struct snd_soc_card *card,
 
        return ret;
 }
+
+struct snd_kcontrol *snd_soc_card_get_kcontrol(struct snd_soc_card *soc_card,
+                                              const char *name)
+{
+       struct snd_card *card = soc_card->snd_card;
+       struct snd_kcontrol *kctl;
+
+       if (unlikely(!name))
+               return NULL;
+
+       list_for_each_entry(kctl, &card->controls, list)
+               if (!strncmp(kctl->id.name, name, sizeof(kctl->id.name)))
+                       return kctl;
+       return NULL;
+}
+EXPORT_SYMBOL_GPL(snd_soc_card_get_kcontrol);
index e1b65059c0c42a69a2d51ba07a6a6235dd712b6d..b6105b92f589d399e9e155aeca9d48682a8aca0f 100644 (file)
@@ -2096,22 +2096,6 @@ static int snd_soc_add_controls(struct snd_card *card, struct device *dev,
        return 0;
 }
 
-struct snd_kcontrol *snd_soc_card_get_kcontrol(struct snd_soc_card *soc_card,
-                                              const char *name)
-{
-       struct snd_card *card = soc_card->snd_card;
-       struct snd_kcontrol *kctl;
-
-       if (unlikely(!name))
-               return NULL;
-
-       list_for_each_entry(kctl, &card->controls, list)
-               if (!strncmp(kctl->id.name, name, sizeof(kctl->id.name)))
-                       return kctl;
-       return NULL;
-}
-EXPORT_SYMBOL_GPL(snd_soc_card_get_kcontrol);
-
 /**
  * snd_soc_add_component_controls - Add an array of controls to a component.
  *