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

ASoC: wm8958: Fix enum ctl accesses in a wrong type

"MBC Mode", "VSS Mode", "VSS HPF Mode" and "Enhanced EQ Mode" ctls in
wm8958 codec driver are enum, while the current driver accesses
wrongly via value.integer.value[]. They have to be via
value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org

authored by

Takashi Iwai and committed by
Mark Brown
d0784829 92e963f5

+4 -4
+4 -4
sound/soc/codecs/wm8958-dsp2.c
··· 459 459 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 460 460 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 461 461 struct wm8994 *control = wm8994->wm8994; 462 - int value = ucontrol->value.integer.value[0]; 462 + int value = ucontrol->value.enumerated.item[0]; 463 463 int reg; 464 464 465 465 /* Don't allow on the fly reconfiguration */ ··· 549 549 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 550 550 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 551 551 struct wm8994 *control = wm8994->wm8994; 552 - int value = ucontrol->value.integer.value[0]; 552 + int value = ucontrol->value.enumerated.item[0]; 553 553 int reg; 554 554 555 555 /* Don't allow on the fly reconfiguration */ ··· 582 582 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 583 583 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 584 584 struct wm8994 *control = wm8994->wm8994; 585 - int value = ucontrol->value.integer.value[0]; 585 + int value = ucontrol->value.enumerated.item[0]; 586 586 int reg; 587 587 588 588 /* Don't allow on the fly reconfiguration */ ··· 749 749 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 750 750 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 751 751 struct wm8994 *control = wm8994->wm8994; 752 - int value = ucontrol->value.integer.value[0]; 752 + int value = ucontrol->value.enumerated.item[0]; 753 753 int reg; 754 754 755 755 /* Don't allow on the fly reconfiguration */