ASoC: intel: sof_sdw: Clean up DAI link counting
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 31 Jul 2023 21:42:55 +0000 (16:42 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 31 Jul 2023 22:22:41 +0000 (23:22 +0100)
commit98a7a1143f83289a84cba6dab60a4531cc4dfae2
tree007ceaf3b4b9fcb3c1f4d678bc57ce6cb1ea5692
parent4754e29c779fe2a2677ba62896daf4bf980602a1
ASoC: intel: sof_sdw: Clean up DAI link counting

The counting of each of the types of DAI link is a bit messy with things
added onto an intermediate variable as it goes along. Re-order things a
little to keep the order consistent with the rest of the function and
simplify the process down to a variable for each type of DAI and then
sum them at the end.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.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-22-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw.c