ASoC: intel: sof_sdw: Update DLC index each time one is added
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 8 Aug 2023 13:20:08 +0000 (14:20 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 8 Aug 2023 17:57:21 +0000 (18:57 +0100)
commit0e82229fb74a26cfaf6ae3772cbdefdb643f98a5
tree03e1c9bc0d65738c77549c408f4750ccfdf6d4ee
parentc3d7e29ad82ee689b1adf5ea7806b9d06eb098c0
ASoC: intel: sof_sdw: Update DLC index each time one is added

In create_sdw_dailink, rather than bulk updating the index into the
DAI link components array, at the end of processing a link, do so each
time the code adds a new component. This simplifies things slightly,
as an intermediate variable is no longer needed to track the current
place in the DAI link components array.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230808132013.889419-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw.c