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>
This commit is contained in:
Kuninori Morimoto
2018-09-18 01:28:49 +00:00
committed by Mark Brown
parent 6d11b12879
commit 7fe072b4df
16 changed files with 73 additions and 66 deletions

View File

@@ -1120,6 +1120,10 @@ struct snd_soc_card {
void *drvdata;
};
#define for_each_card_prelinks(card, i, link) \
for ((i) = 0; \
((i) < (card)->num_links) && ((link) = &(card)->dai_link[i]); \
(i)++)
/* SoC machine DAI configuration, glues a codec and cpu DAI together */
struct snd_soc_pcm_runtime {