diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2024-07-10 15:52:33 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-07-29 02:17:19 +0200 |
commit | 7eb62acd43c9299630f0e859f56981072401c5b6 (patch) | |
tree | 883d935f8d876ef308a6605976c4b6d9625f97ce /sound/soc/codecs | |
parent | ASoC: codecs: wsa883x: Simplify handling variant/version (diff) | |
download | linux-7eb62acd43c9299630f0e859f56981072401c5b6.tar.xz linux-7eb62acd43c9299630f0e859f56981072401c5b6.zip |
ASoC: codecs: wsa884x: Simplify handling variant
Driver does not use detected variant variable past the init function, so
do not store it in the state container structure.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240710-asoc-wsa88xx-version-v1-4-f1c54966ccde@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/wsa884x.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/codecs/wsa884x.c b/sound/soc/codecs/wsa884x.c index d17ae17b2938..c0f9a3e5ad14 100644 --- a/sound/soc/codecs/wsa884x.c +++ b/sound/soc/codecs/wsa884x.c @@ -703,7 +703,6 @@ struct wsa884x_priv { struct reset_control *sd_reset; bool port_prepared[WSA884X_MAX_SWR_PORTS]; bool port_enable[WSA884X_MAX_SWR_PORTS]; - unsigned int variant; int active_ports; int dev_mode; bool hw_init; @@ -1465,7 +1464,7 @@ static void wsa884x_init(struct wsa884x_priv *wsa884x) unsigned int variant = 0; if (!regmap_read(wsa884x->regmap, WSA884X_OTP_REG_0, &variant)) - wsa884x->variant = variant & WSA884X_OTP_REG_0_ID_MASK; + variant = variant & WSA884X_OTP_REG_0_ID_MASK; regmap_multi_reg_write(wsa884x->regmap, wsa884x_reg_init, ARRAY_SIZE(wsa884x_reg_init)); @@ -1474,7 +1473,7 @@ static void wsa884x_init(struct wsa884x_priv *wsa884x) wo_ctl_0 |= FIELD_PREP(WSA884X_ANA_WO_CTL_0_DAC_CM_CLAMP_EN_MASK, WSA884X_ANA_WO_CTL_0_DAC_CM_CLAMP_EN_MODE_SPEAKER); /* Assume that compander is enabled by default unless it is haptics sku */ - if (wsa884x->variant == WSA884X_OTP_ID_WSA8845H) + if (variant == WSA884X_OTP_ID_WSA8845H) wo_ctl_0 |= FIELD_PREP(WSA884X_ANA_WO_CTL_0_PA_AUX_GAIN_MASK, WSA884X_ANA_WO_CTL_0_PA_AUX_18_DB); else |