soundwire: stream: move list addition to sdw_slave_alloc_rt()
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 26 Jan 2022 01:17:11 +0000 (09:17 +0800)
committerVinod Koul <vkoul@kernel.org>
Fri, 11 Feb 2022 06:47:54 +0000 (12:17 +0530)
commit42aad41e969988d9058f8751f3fd952c60519308
tree3173f4ef35098e0d70a1064b74f0f512d43230c9
parent00ce0d2afe5a8a1a7553bfcfe0e005e54f4d2003
soundwire: stream: move list addition to sdw_slave_alloc_rt()

Simplify sdw_stream_add_slave() by moving the linked list management
inside of the sdw_slave_alloc_rt_free() helper, this also makes the
alloc/free helpers more symmetrical.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220126011715.28204-16-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/stream.c