ASoC: intel: sof_sdw: Rename codec_idx to codec_dlc_index
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 31 Jul 2023 21:42:44 +0000 (16:42 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 31 Jul 2023 22:22:30 +0000 (23:22 +0100)
Having two local variables called codec_idx and codec_index, that refer
to different things is a little confusing. Rename codec_idx to
codec_dlc_index to indicate it points into the dai_link_component array.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230731214257.444605-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw.c

index 6f65f45..0743bf0 100644 (file)
@@ -1378,7 +1378,7 @@ static int create_sdw_dailink(struct snd_soc_card *card,
        int cpu_dai_id[SDW_MAX_CPU_DAIS];
        int cpu_dai_num, cpu_dai_index;
        unsigned int group_id;
-       int codec_idx = 0;
+       int codec_dlc_index = 0;
        int codec_index;
        int codec_num;
        int stream;
@@ -1409,7 +1409,7 @@ static int create_sdw_dailink(struct snd_soc_card *card,
                if (cpu_dai_id[i] != ffs(adr_link_next->mask) - 1)
                        continue;
 
-               ret = create_codec_dai_name(dev, adr_link_next, codecs, codec_idx,
+               ret = create_codec_dai_name(dev, adr_link_next, codecs, codec_dlc_index,
                                            codec_conf, codec_count, codec_conf_index,
                                            adr_index, dai_index);
                if (ret < 0)
@@ -1417,7 +1417,7 @@ static int create_sdw_dailink(struct snd_soc_card *card,
 
                /* check next link to create codec dai in the processed group */
                i++;
-               codec_idx += adr_link_next->num_adr;
+               codec_dlc_index += adr_link_next->num_adr;
        }
 
        /* find codec info to create BE DAI */