summaryrefslogtreecommitdiff
path: root/sound/soc/intel
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2018-09-18 04:28:49 +0300
committerMark Brown <broonie@kernel.org>2018-09-20 20:18:34 +0300
commit7fe072b4df5d0cc832eb758c1eed243c145a2dfc (patch)
treeb3b33044d52db6935e7346540cd3ddbf1a3f0ab0 /sound/soc/intel
parent6d11b12879144da5f5aa08071a8a7f95f3b5a4e8 (diff)
downloadlinux-7fe072b4df5d0cc832eb758c1eed243c145a2dfc.tar.xz
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/intel')
-rw-r--r--sound/soc/intel/boards/skl_hda_dsp_generic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/intel/boards/skl_hda_dsp_generic.c b/sound/soc/intel/boards/skl_hda_dsp_generic.c
index b213e9b47505..b415dd4c85f5 100644
--- a/sound/soc/intel/boards/skl_hda_dsp_generic.c
+++ b/sound/soc/intel/boards/skl_hda_dsp_generic.c
@@ -104,6 +104,7 @@ static struct snd_soc_card hda_soc_card = {
static int skl_hda_fill_card_info(struct skl_machine_pdata *pdata)
{
struct snd_soc_card *card = &hda_soc_card;
+ struct snd_soc_dai_link *dai_link;
u32 codec_count, codec_mask;
int i, num_links, num_route;
@@ -125,8 +126,8 @@ static int skl_hda_fill_card_info(struct skl_machine_pdata *pdata)
card->num_links = num_links;
card->num_dapm_routes = num_route;
- for (i = 0; i < num_links; i++)
- skl_hda_be_dai_links[i].platform_name = pdata->platform;
+ for_each_card_prelinks(card, i, dai_link)
+ dai_link->platform_name = pdata->platform;
return 0;
}