summaryrefslogtreecommitdiff
path: root/sound/soc/qcom/apq8096.c
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/qcom/apq8096.c
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/qcom/apq8096.c')
-rw-r--r--sound/soc/qcom/apq8096.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c
index 1543e85629f8..fb45f396ab4a 100644
--- a/sound/soc/qcom/apq8096.c
+++ b/sound/soc/qcom/apq8096.c
@@ -25,13 +25,12 @@ static int apq8096_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
static void apq8096_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->be_hw_params_fixup = apq8096_be_hw_params_fixup;
- link++;
}
}