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

ASoC: codecs: rt1308: 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-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org

authored by

Krzysztof Kozlowski and committed by
Mark Brown
cc3ff544 bc8c537b

+1 -5
+1 -4
sound/soc/codecs/rt1308-sdw.c
··· 304 304 { 305 305 struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(&slave->dev); 306 306 307 - /* Update the status */ 308 - rt1308->status = status; 309 - 310 307 if (status == SDW_SLAVE_UNATTACHED) 311 308 rt1308->hw_init = false; 312 309 ··· 311 314 * Perform initialization only if slave status is present and 312 315 * hw_init flag is false 313 316 */ 314 - if (rt1308->hw_init || rt1308->status != SDW_SLAVE_ATTACHED) 317 + if (rt1308->hw_init || status != SDW_SLAVE_ATTACHED) 315 318 return 0; 316 319 317 320 /* perform I/O transfers required for Slave initialization */
-1
sound/soc/codecs/rt1308-sdw.h
··· 159 159 struct snd_soc_component *component; 160 160 struct regmap *regmap; 161 161 struct sdw_slave *sdw_slave; 162 - enum sdw_slave_status status; 163 162 struct sdw_bus_params params; 164 163 bool hw_init; 165 164 bool first_hw_init;