Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: codecs: rt715-sdca: do not store status in state container

Driver in its update status callback stores Soundwire device status in
state container but it never uses it later. Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-11-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org

authored by

Krzysztof Kozlowski and committed by
Mark Brown
cda72c89 5cd02f96

+1 -5
+1 -4
sound/soc/codecs/rt715-sdca-sdw.c
··· 121 121 { 122 122 struct rt715_sdca_priv *rt715 = dev_get_drvdata(&slave->dev); 123 123 124 - /* Update the status */ 125 - rt715->status = status; 126 - 127 124 /* 128 125 * Perform initialization only if slave status is present and 129 126 * hw_init flag is false 130 127 */ 131 - if (rt715->hw_init || rt715->status != SDW_SLAVE_ATTACHED) 128 + if (rt715->hw_init || status != SDW_SLAVE_ATTACHED) 132 129 return 0; 133 130 134 131 /* perform I/O transfers required for Slave initialization */
-1
sound/soc/codecs/rt715-sdca.h
··· 24 24 int dbg_nid; 25 25 int dbg_vid; 26 26 int dbg_payload; 27 - enum sdw_slave_status status; 28 27 struct sdw_bus_params params; 29 28 bool hw_init; 30 29 bool first_hw_init;