diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2018-09-18 04:28:49 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-09-20 20:18:34 +0300 |
commit | 7fe072b4df5d0cc832eb758c1eed243c145a2dfc (patch) | |
tree | b3b33044d52db6935e7346540cd3ddbf1a3f0ab0 /sound/soc/qcom/sdm845.c | |
parent | 6d11b12879144da5f5aa08071a8a7f95f3b5a4e8 (diff) | |
download | linux-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/qcom/sdm845.c')
-rw-r--r-- | sound/soc/qcom/sdm845.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index 2a781d87ee65..9effbecc571f 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -195,15 +195,14 @@ static int sdm845_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, static void sdm845_add_be_ops(struct snd_soc_card *card) { - struct snd_soc_dai_link *link = card->dai_link; - int i, num_links = card->num_links; + struct snd_soc_dai_link *link; + int i; - for (i = 0; i < num_links; i++) { + for_each_card_prelinks(card, i, link) { if (link->no_pcm == 1) { link->ops = &sdm845_be_ops; link->be_hw_params_fixup = sdm845_be_hw_params_fixup; } - link++; } } |