ASoC: intel: sof_sdw: Pull device loop up into create_sdw_dailink
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 8 Aug 2023 13:20:07 +0000 (14:20 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 8 Aug 2023 17:57:20 +0000 (18:57 +0100)
commitc3d7e29ad82ee689b1adf5ea7806b9d06eb098c0
treee1b8501c5b8b28339471cbf6bf2c33d8c446482f
parent92e9f10a093529f85b7557b0627531728d89afa2
ASoC: intel: sof_sdw: Pull device loop up into create_sdw_dailink

The loops which fill the codec DAI link component structures are split
across create_sdw_dailink and create_codec_dai_name. This causes the
code to be rather confusing, needing to return out the function to allow
the upper loop to iterate. Remove the create_codec_dai_name helper and
pull its code up into create_sdw_dailink, this makes it more obvious
what is happening in the code. This patch makes no functional change
just hoists the code up a level.

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-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw.c