ASoC: soc-core: remove OF adjusting for snd_soc_of_parse_audio_prefix
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 27 Jan 2017 06:37:16 +0000 (06:37 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 27 Jan 2017 11:59:36 +0000 (11:59 +0000)
Because prototype of OF-graph sound card support didn't have Sound Card
node, commit b6defcca0a604129155ae472b116a2e1688d8995
("ASoC: soc-core: adjust for graph on snd_soc_of_parse_audio_prefix")
adjusted to it on each functions.

But final discussion result of ALSA SoC / OF-graph ML, OF-graph sound
card has node. Thus, this commit became no longer needed.

This reverts commit b6defcca0a604129155ae472b116a2e1688d8995.

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 4dccc4f63f5e5e3f5f76330a49194daf02658651..34bd033443dc9120f7a4a514b994f581ada9ea9a 100644 (file)
@@ -1656,11 +1656,7 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np,
                              unsigned int *rx_mask,
                              unsigned int *slots,
                              unsigned int *slot_width);
-#define snd_soc_of_parse_audio_prefix(card, codec_conf, of_node, propname) \
-       snd_soc_of_parse_audio_prefix_from_node(card, NULL, codec_conf, \
-                                               of_node, propname)
-void snd_soc_of_parse_audio_prefix_from_node(struct snd_soc_card *card,
-                                  struct device_node *np,
+void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card,
                                   struct snd_soc_codec_conf *codec_conf,
                                   struct device_node *of_node,
                                   const char *propname);
index 656a981f6eb1f19f3156a9d300f6bfe5ba6d8562..4ff2448f6023651fff930fcc42f1e796f7aad0d9 100644 (file)
@@ -3664,18 +3664,15 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np,
 }
 EXPORT_SYMBOL_GPL(snd_soc_of_parse_tdm_slot);
 
-void snd_soc_of_parse_audio_prefix_from_node(struct snd_soc_card *card,
-                                  struct device_node *np,
+void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card,
                                   struct snd_soc_codec_conf *codec_conf,
                                   struct device_node *of_node,
                                   const char *propname)
 {
+       struct device_node *np = card->dev->of_node;
        const char *str;
        int ret;
 
-       if (!np)
-               np = card->dev->of_node;
-
        ret = of_property_read_string(np, propname, &str);
        if (ret < 0) {
                /* no prefix is not error */
@@ -3685,7 +3682,7 @@ void snd_soc_of_parse_audio_prefix_from_node(struct snd_soc_card *card,
        codec_conf->of_node     = of_node;
        codec_conf->name_prefix = str;
 }
-EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_prefix_from_node);
+EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_prefix);
 
 int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
                                   const char *propname)