diff options
author | Jyri Sarha <jsarha@ti.com> | 2014-04-24 12:42:00 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-24 13:23:49 -0400 |
commit | 648722155dc081b019ab0ef548bbebde760a2b83 (patch) | |
tree | f5b286b235b189543142f19ebcd6344c1ba72321 /sound/soc/generic | |
parent | 781cbebed750af26341e551b785048a1ea347c5e (diff) |
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/soc/generic')
-rw-r--r-- | sound/soc/generic/simple-card.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 98f97e543c29..06fe0e22b267 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, | |||
144 | static int simple_card_dai_link_of(struct device_node *node, | 144 | static int simple_card_dai_link_of(struct device_node *node, |
145 | struct device *dev, | 145 | struct device *dev, |
146 | struct snd_soc_dai_link *dai_link, | 146 | struct snd_soc_dai_link *dai_link, |
147 | struct simple_dai_props *dai_props) | 147 | struct simple_dai_props *dai_props, |
148 | bool is_top_level_node) | ||
148 | { | 149 | { |
149 | struct device_node *np = NULL; | 150 | struct device_node *np = NULL; |
150 | struct device_node *bitclkmaster = NULL; | 151 | struct device_node *bitclkmaster = NULL; |
@@ -155,7 +156,8 @@ static int simple_card_dai_link_of(struct device_node *node, | |||
155 | char *prefix = ""; | 156 | char *prefix = ""; |
156 | int ret; | 157 | int ret; |
157 | 158 | ||
158 | prefix = "simple-audio-card,"; | 159 | if (is_top_level_node) |
160 | prefix = "simple-audio-card,"; | ||
159 | 161 | ||
160 | daifmt = snd_soc_of_parse_daifmt(node, prefix, | 162 | daifmt = snd_soc_of_parse_daifmt(node, prefix, |
161 | &bitclkmaster, &framemaster); | 163 | &bitclkmaster, &framemaster); |
@@ -307,14 +309,15 @@ static int asoc_simple_card_parse_of(struct device_node *node, | |||
307 | for (i = 0; (np = of_get_next_child(node, np)); i++) { | 309 | for (i = 0; (np = of_get_next_child(node, np)); i++) { |
308 | dev_dbg(dev, "\tlink %d:\n", i); | 310 | dev_dbg(dev, "\tlink %d:\n", i); |
309 | ret = simple_card_dai_link_of(np, dev, dai_link + i, | 311 | ret = simple_card_dai_link_of(np, dev, dai_link + i, |
310 | dai_props + i); | 312 | dai_props + i, false); |
311 | if (ret < 0) { | 313 | if (ret < 0) { |
312 | of_node_put(np); | 314 | of_node_put(np); |
313 | return ret; | 315 | return ret; |
314 | } | 316 | } |
315 | } | 317 | } |
316 | } else { | 318 | } else { |
317 | ret = simple_card_dai_link_of(node, dev, dai_link, dai_props); | 319 | ret = simple_card_dai_link_of(node, dev, dai_link, dai_props, |
320 | true); | ||
318 | if (ret < 0) | 321 | if (ret < 0) |
319 | return ret; | 322 | return ret; |
320 | } | 323 | } |