summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2014-04-24 19:42:00 +0300
committerMark Brown <broonie@linaro.org>2014-04-24 18:23:49 +0100
commit648722155dc081b019ab0ef548bbebde760a2b83 (patch)
treef5b286b235b189543142f19ebcd6344c1ba72321 /sound
parent781cbebed750af26341e551b785048a1ea347c5e (diff)
downloadop-kernel-dev-648722155dc081b019ab0ef548bbebde760a2b83.zip
op-kernel-dev-648722155dc081b019ab0ef548bbebde760a2b83.tar.gz
ASoC: simple-card: is_top_level_node parameter to simple_card_dai_link_of()
Restore correct parsing of dai-link subnodes with more explicit implementation for applying the "simple-audio-card,"-prefix to dai-link property and subnode names. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/generic/simple-card.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 98f97e5..06fe0e2 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -144,7 +144,8 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
static int simple_card_dai_link_of(struct device_node *node,
struct device *dev,
struct snd_soc_dai_link *dai_link,
- struct simple_dai_props *dai_props)
+ struct simple_dai_props *dai_props,
+ bool is_top_level_node)
{
struct device_node *np = NULL;
struct device_node *bitclkmaster = NULL;
@@ -155,7 +156,8 @@ static int simple_card_dai_link_of(struct device_node *node,
char *prefix = "";
int ret;
- prefix = "simple-audio-card,";
+ if (is_top_level_node)
+ prefix = "simple-audio-card,";
daifmt = snd_soc_of_parse_daifmt(node, prefix,
&bitclkmaster, &framemaster);
@@ -307,14 +309,15 @@ static int asoc_simple_card_parse_of(struct device_node *node,
for (i = 0; (np = of_get_next_child(node, np)); i++) {
dev_dbg(dev, "\tlink %d:\n", i);
ret = simple_card_dai_link_of(np, dev, dai_link + i,
- dai_props + i);
+ dai_props + i, false);
if (ret < 0) {
of_node_put(np);
return ret;
}
}
} else {
- ret = simple_card_dai_link_of(node, dev, dai_link, dai_props);
+ ret = simple_card_dai_link_of(node, dev, dai_link, dai_props,
+ true);
if (ret < 0)
return ret;
}
OpenPOWER on IntegriCloud