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

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

authored by

Krzysztof Kozlowski and committed by
Mark Brown
28eb1e42 70207b95

+1 -5
+1 -4
sound/soc/codecs/rt1318-sdw.c
··· 456 456 { 457 457 struct rt1318_sdw_priv *rt1318 = dev_get_drvdata(&slave->dev); 458 458 459 - /* Update the status */ 460 - rt1318->status = status; 461 - 462 459 if (status == SDW_SLAVE_UNATTACHED) 463 460 rt1318->hw_init = false; 464 461 ··· 463 466 * Perform initialization only if slave status is present and 464 467 * hw_init flag is false 465 468 */ 466 - if (rt1318->hw_init || rt1318->status != SDW_SLAVE_ATTACHED) 469 + if (rt1318->hw_init || status != SDW_SLAVE_ATTACHED) 467 470 return 0; 468 471 469 472 /* perform I/O transfers required for Slave initialization */
-1
sound/soc/codecs/rt1318-sdw.h
··· 88 88 struct snd_soc_component *component; 89 89 struct regmap *regmap; 90 90 struct sdw_slave *sdw_slave; 91 - enum sdw_slave_status status; 92 91 struct sdw_bus_params params; 93 92 bool hw_init; 94 93 bool first_hw_init;