ASoC: intel: cml_rt1011_rt5682: use for_each_rtd_codec_dai() macro
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 19 Feb 2020 06:56:15 +0000 (15:56 +0900)
committerMark Brown <broonie@kernel.org>
Wed, 19 Feb 2020 17:12:16 +0000 (17:12 +0000)
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87k14jjcaq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/cml_rt1011_rt5682.c

index dd80d01..02aa18d 100644 (file)
@@ -164,8 +164,7 @@ static int cml_rt1011_hw_params(struct snd_pcm_substream *substream,
 
        srate = params_rate(params);
 
-       for (i = 0; i < rtd->num_codecs; i++) {
-               codec_dai = rtd->codec_dais[i];
+       for_each_rtd_codec_dai(rtd, i, codec_dai) {
 
                /* 100 Fs to drive 24 bit data */
                ret = snd_soc_dai_set_pll(codec_dai, 0, RT1011_PLL1_S_BCLK,