ASoC: Intel: sof_sdw: Only pass dai_link pointer around
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 26 Mar 2024 16:04:03 +0000 (11:04 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 26 Mar 2024 16:13:26 +0000 (16:13 +0000)
commitc577b747b9a0ad32047dcfa01d0ea7e2441cf590
treeb3470a8efee049aa13c8a16299f078083e4d776d
parentd36bfa329ae6d94e435d11960936023c03df0d64
ASoC: Intel: sof_sdw: Only pass dai_link pointer around

Rather than passing around a pointer to the dai_link array and
an index into this array, simply pass a pointer to the current
dai_link. Also move the DAI link pointer sanity check to the end
of the DAI link creation, and change it to a warn on. This check
should only be hit if there is a serious bug in the machine driver,
so checking it on each iteration is excessive.

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://msgid.link/r/20240326160429.13560-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw.c