diff options
author | Jarkko Nikula <jarkko.nikula@nokia.com> | 2009-02-06 05:01:05 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-02-06 06:39:28 -0500 |
commit | 397d5aeeb5a2c9ca6108899a04b35a51cd904503 (patch) | |
tree | e2431935f8a839167960db9df89eb3ac8c999ba3 /sound/soc | |
parent | 4453dba54de7e517b0cd6f5e4a3f4af3b34f9e79 (diff) |
ASoC: WM8990: Fix kcontrol's private value use in put callback
Function wm899x_outpga_put_volsw_vu misuses the kcontrol's private value
by still accessing it as bitfields even SOC_SINGLE_VALUE constructs it
as a pointer into struct soc_mixer_control after the commit
4eaa9819dc08d7bfd1065ce530e31b18a119dcaf.
This is very similar fix than fix to TLV320AIC3X codec made by
Eero Nurkkala <ext-eero.nurkkala@nokia.com>. This fix is compile tested
only.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/wm8990.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 1cbb7b9b51ce..a5731faa150c 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -176,7 +176,9 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, | |||
176 | struct snd_ctl_elem_value *ucontrol) | 176 | struct snd_ctl_elem_value *ucontrol) |
177 | { | 177 | { |
178 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 178 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
179 | int reg = kcontrol->private_value & 0xff; | 179 | struct soc_mixer_control *mc = |
180 | (struct soc_mixer_control *)kcontrol->private_value; | ||
181 | int reg = mc->reg; | ||
180 | int ret; | 182 | int ret; |
181 | u16 val; | 183 | u16 val; |
182 | 184 | ||