summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/pcm030-audio-fabric.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2018-09-18 03:28:49 +0200
committerMark Brown <broonie@kernel.org>2018-09-20 19:18:34 +0200
commit7fe072b4df5d0cc832eb758c1eed243c145a2dfc (patch)
treeb3b33044d52db6935e7346540cd3ddbf1a3f0ab0 /sound/soc/fsl/pcm030-audio-fabric.c
parentASoC: rename for_each_rtd_codec_dai_reverse to rollback (diff)
downloadlinux-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.c5
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)