Merge tag 'nfs-for-4.3-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[deliverable/linux.git] / sound / soc / soc-core.c
index 0c0ac0134ab7ed0a53a51dfc633109e1d2a8f466..6173d15236c3c0c2ce53c3c31b721310f9576e9e 100644 (file)
@@ -3320,6 +3320,26 @@ 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(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;
+
+       ret = of_property_read_string(np, propname, &str);
+       if (ret < 0) {
+               /* no prefix is not error */
+               return;
+       }
+
+       codec_conf->of_node     = of_node;
+       codec_conf->name_prefix = str;
+}
+EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_prefix);
+
 int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
                                   const char *propname)
 {
This page took 0.02812 seconds and 5 git commands to generate.