summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-08-27 20:08:47 -0700
committerMark Brown <broonie@kernel.org>2014-08-29 12:51:02 +0100
commita44a750e5299fe2ece5aa68e8562dd6e2c2b16f4 (patch)
tree90b9f04412bacf2663234383a078e90890e6db3f /sound
parenta5960bd5984c808cdf7aa528e162e9e20e61b923 (diff)
downloadtalos-obmc-linux-a44a750e5299fe2ece5aa68e8562dd6e2c2b16f4.tar.gz
talos-obmc-linux-a44a750e5299fe2ece5aa68e8562dd6e2c2b16f4.zip
ASoC: simple-card: use common for_each_child_of_node() for loop
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/generic/simple-card.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 89027047364f..fd8b04588948 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -346,8 +346,9 @@ static int asoc_simple_card_parse_of(struct device_node *node,
if (multi) {
struct device_node *np = NULL;
- int i;
- for (i = 0; (np = of_get_next_child(node, np)); i++) {
+ int i = 0;
+
+ for_each_child_of_node(node, np) {
dev_dbg(dev, "\tlink %d:\n", i);
ret = asoc_simple_card_dai_link_of(np, dev,
dai_link + i,
@@ -357,6 +358,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
of_node_put(np);
return ret;
}
+ i++;
}
} else {
ret = asoc_simple_card_dai_link_of(node, dev,
OpenPOWER on IntegriCloud