mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
ASoC: codecs: wcd938x: Drop unused variant field
Member wcd938x_priv.variant is assigned in probe() function and used immediately thereafter, thus it can be just a local variable for less variables stored in 'struct wcd938x_priv' device-wide state. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20250528-asoc-const-unused-v1-7-19a5d07b9d5c@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
fd32bd4467
commit
ff228b6b9e
|
|
@ -168,7 +168,6 @@ struct wcd938x_priv {
|
|||
u32 tx_mode[TX_ADC_MAX];
|
||||
int flyback_cur_det_disable;
|
||||
int ear_rx_path;
|
||||
int variant;
|
||||
struct gpio_desc *reset_gpio;
|
||||
struct gpio_desc *us_euro_gpio;
|
||||
struct mux_control *us_euro_mux;
|
||||
|
|
@ -3044,6 +3043,7 @@ static int wcd938x_soc_codec_probe(struct snd_soc_component *component)
|
|||
struct sdw_slave *tx_sdw_dev = wcd938x->tx_sdw_dev;
|
||||
struct device *dev = component->dev;
|
||||
unsigned long time_left;
|
||||
unsigned int variant;
|
||||
int ret, i;
|
||||
|
||||
time_left = wait_for_completion_timeout(&tx_sdw_dev->initialization_complete,
|
||||
|
|
@ -3059,9 +3059,9 @@ static int wcd938x_soc_codec_probe(struct snd_soc_component *component)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
wcd938x->variant = snd_soc_component_read_field(component,
|
||||
WCD938X_DIGITAL_EFUSE_REG_0,
|
||||
WCD938X_ID_MASK);
|
||||
variant = snd_soc_component_read_field(component,
|
||||
WCD938X_DIGITAL_EFUSE_REG_0,
|
||||
WCD938X_ID_MASK);
|
||||
|
||||
wcd938x->clsh_info = wcd_clsh_ctrl_alloc(component, WCD938X);
|
||||
if (IS_ERR(wcd938x->clsh_info)) {
|
||||
|
|
@ -3115,14 +3115,14 @@ static int wcd938x_soc_codec_probe(struct snd_soc_component *component)
|
|||
disable_irq_nosync(wcd938x->hphl_pdm_wd_int);
|
||||
disable_irq_nosync(wcd938x->aux_pdm_wd_int);
|
||||
|
||||
switch (wcd938x->variant) {
|
||||
switch (variant) {
|
||||
case WCD9380:
|
||||
ret = snd_soc_add_component_controls(component, wcd9380_snd_controls,
|
||||
ARRAY_SIZE(wcd9380_snd_controls));
|
||||
if (ret < 0) {
|
||||
dev_err(component->dev,
|
||||
"%s: Failed to add snd ctrls for variant: %d\n",
|
||||
__func__, wcd938x->variant);
|
||||
__func__, variant);
|
||||
goto err_free_aux_pdm_wd_int;
|
||||
}
|
||||
break;
|
||||
|
|
@ -3132,7 +3132,7 @@ static int wcd938x_soc_codec_probe(struct snd_soc_component *component)
|
|||
if (ret < 0) {
|
||||
dev_err(component->dev,
|
||||
"%s: Failed to add snd ctrls for variant: %d\n",
|
||||
__func__, wcd938x->variant);
|
||||
__func__, variant);
|
||||
goto err_free_aux_pdm_wd_int;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user