diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2018-09-17 21:28:49 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-09-20 13:18:34 -0400 |
commit | 7fe072b4df5d0cc832eb758c1eed243c145a2dfc (patch) | |
tree | b3b33044d52db6935e7346540cd3ddbf1a3f0ab0 /sound/soc/meson | |
parent | 6d11b12879144da5f5aa08071a8a7f95f3b5a4e8 (diff) |
ASoC: add for_each_card_prelinks() macro
To be more readable code, this patch adds
new for_each_card_prelinks() macro, and replace existing code to it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/meson')
-rw-r--r-- | sound/soc/meson/axg-card.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index 197e10a96e28..aa54d2c612c9 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c | |||
@@ -101,8 +101,7 @@ static void axg_card_clean_references(struct axg_card *priv) | |||
101 | int i, j; | 101 | int i, j; |
102 | 102 | ||
103 | if (card->dai_link) { | 103 | if (card->dai_link) { |
104 | for (i = 0; i < card->num_links; i++) { | 104 | for_each_card_prelinks(card, i, link) { |
105 | link = &card->dai_link[i]; | ||
106 | of_node_put(link->cpu_of_node); | 105 | of_node_put(link->cpu_of_node); |
107 | for_each_link_codecs(link, j, codec) | 106 | for_each_link_codecs(link, j, codec) |
108 | of_node_put(codec->of_node); | 107 | of_node_put(codec->of_node); |