diff options
author | Jarkko Nikula <jhnikula@gmail.com> | 2011-05-13 12:16:52 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-05-16 12:06:47 -0400 |
commit | 9d03545d886bedd2c81b8f28ae0cc68c356d02f7 (patch) | |
tree | bc1d7c1d2d94c4e4eba1c51bcf77f50e467bb21e /sound/soc/codecs/tlv320aic3x.c | |
parent | fa63e477ddb09075f68cd5fe4db8f8045627a787 (diff) |
ASoC: Fix wrong data type access in a few codec drivers
Commit fafd217 ("ASoC: Store a list of widgets in a DAPM mux/mixer kcontrol")
changed the control private data type that is passed to snd_soc_cnew when
creating dapm mixer and mux controls. Commit did not update a few codec
drivers that are using their own put callbacks and thus are accessing a
wrong data type.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/tlv320aic3x.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 6c43c13f0430..c3d96fc8c267 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -157,7 +157,8 @@ static int aic3x_read(struct snd_soc_codec *codec, unsigned int reg, | |||
157 | static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, | 157 | static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, |
158 | struct snd_ctl_elem_value *ucontrol) | 158 | struct snd_ctl_elem_value *ucontrol) |
159 | { | 159 | { |
160 | struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); | 160 | struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); |
161 | struct snd_soc_dapm_widget *widget = wlist->widgets[0]; | ||
161 | struct soc_mixer_control *mc = | 162 | struct soc_mixer_control *mc = |
162 | (struct soc_mixer_control *)kcontrol->private_value; | 163 | (struct soc_mixer_control *)kcontrol->private_value; |
163 | unsigned int reg = mc->reg; | 164 | unsigned int reg = mc->reg; |