diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2018-09-18 03:28:49 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-09-20 19:18:34 +0200 |
commit | 7fe072b4df5d0cc832eb758c1eed243c145a2dfc (patch) | |
tree | b3b33044d52db6935e7346540cd3ddbf1a3f0ab0 /sound/soc/fsl/pcm030-audio-fabric.c | |
parent | ASoC: rename for_each_rtd_codec_dai_reverse to rollback (diff) | |
download | linux-7fe072b4df5d0cc832eb758c1eed243c145a2dfc.tar.xz linux-7fe072b4df5d0cc832eb758c1eed243c145a2dfc.zip |
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/fsl/pcm030-audio-fabric.c')
-rw-r--r-- | sound/soc/fsl/pcm030-audio-fabric.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c index ec731223cab3..e339f36cea95 100644 --- a/sound/soc/fsl/pcm030-audio-fabric.c +++ b/sound/soc/fsl/pcm030-audio-fabric.c @@ -57,6 +57,7 @@ static int pcm030_fabric_probe(struct platform_device *op) struct device_node *platform_np; struct snd_soc_card *card = &pcm030_card; struct pcm030_audio_data *pdata; + struct snd_soc_dai_link *dai_link; int ret; int i; @@ -78,8 +79,8 @@ static int pcm030_fabric_probe(struct platform_device *op) return -ENODEV; } - for (i = 0; i < card->num_links; i++) - card->dai_link[i].platform_of_node = platform_np; + for_each_card_prelinks(card, i, dai_link) + dai_link->platform_of_node = platform_np; ret = request_module("snd-soc-wm9712"); if (ret) |