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

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

authored by

Krzysztof Kozlowski and committed by
Mark Brown
9564c9f6 758665b1

+1 -5
+1 -4
sound/soc/codecs/rt700-sdw.c
··· 315 315 { 316 316 struct rt700_priv *rt700 = dev_get_drvdata(&slave->dev); 317 317 318 - /* Update the status */ 319 - rt700->status = status; 320 - 321 318 if (status == SDW_SLAVE_UNATTACHED) 322 319 rt700->hw_init = false; 323 320 ··· 322 325 * Perform initialization only if slave status is present and 323 326 * hw_init flag is false 324 327 */ 325 - if (rt700->hw_init || rt700->status != SDW_SLAVE_ATTACHED) 328 + if (rt700->hw_init || status != SDW_SLAVE_ATTACHED) 326 329 return 0; 327 330 328 331 /* perform I/O transfers required for Slave initialization */
-1
sound/soc/codecs/rt700.h
··· 15 15 struct regmap *regmap; 16 16 struct regmap *sdw_regmap; 17 17 struct sdw_slave *slave; 18 - enum sdw_slave_status status; 19 18 struct sdw_bus_params params; 20 19 bool hw_init; 21 20 bool first_hw_init;