Commit 4fc16d21 authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown

ASoC: intel: sof_sdw: Rename codec_idx to codec_dlc_index

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: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarRander Wang <rander.wang@intel.com>
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230731214257.444605-11-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1d106238
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment