diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2018-09-03 04:12:40 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-09-04 17:59:11 +0200 |
commit | 3db769f17714ae65f2faf44ff2bae9d52f4bd46b (patch) | |
tree | 006474c276d60c9d5c5b515487dac83ce28b0977 /sound/soc/meson | |
parent | ASoC: tlv320aic31xx: Add overflow detection support (diff) | |
download | linux-3db769f17714ae65f2faf44ff2bae9d52f4bd46b.tar.xz linux-3db769f17714ae65f2faf44ff2bae9d52f4bd46b.zip |
ASoC: add for_each_link_codecs() macro
ALSA SoC snd_soc_dai_link has snd_soc_dai_link_component array
for codecs.
To be more readable code, this patch adds
new for_each_link_codecs() 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 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index b76a5f4f1785..3e68f1aa68ff 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -97,14 +97,15 @@ static void axg_card_clean_references(struct axg_card *priv) { struct snd_soc_card *card = &priv->card; struct snd_soc_dai_link *link; + struct snd_soc_dai_link_component *codec; int i, j; if (card->dai_link) { for (i = 0; i < card->num_links; i++) { link = &card->dai_link[i]; of_node_put(link->cpu_of_node); - for (j = 0; j < link->num_codecs; j++) - of_node_put(link->codecs[j].of_node); + for_each_link_codecs(link, j, codec) + of_node_put(codec->of_node); } } |