aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2016-11-11 01:19:03 +0000
committerMark Brown <broonie@kernel.org>2016-11-11 15:19:35 +0000
commitb6defcca0a604129155ae472b116a2e1688d8995 (patch)
tree6ec8c4baa3888f9815a7c9c6391556868979b0d9 /sound/soc/soc-core.c
parentASoC: soc-core: snd_soc_get_dai_name() become non static (diff)
downloadwireguard-linux-b6defcca0a604129155ae472b116a2e1688d8995.tar.xz
wireguard-linux-b6defcca0a604129155ae472b116a2e1688d8995.zip
ASoC: soc-core: adjust for graph on snd_soc_of_parse_audio_prefix
It is assuming that the card related information is located on "card" node, but graph case doesn't have it. This patch adds node parameter to adjust for graph support Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 81b604151f26..e4c90806fa10 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3595,15 +3595,18 @@ 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,
+void snd_soc_of_parse_audio_prefix_from_node(struct snd_soc_card *card,
+ struct device_node *np,
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 */
@@ -3613,7 +3616,7 @@ void snd_soc_of_parse_audio_prefix(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);
+EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_prefix_from_node);
int snd_soc_of_parse_audio_routing_from_node(struct snd_soc_card *card,
struct device_node *np,