From 9d03545d886bedd2c81b8f28ae0cc68c356d02f7 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Fri, 13 May 2011 19:16:52 +0300 Subject: 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 Tested-by: Stephen Warren Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- sound/soc/codecs/tlv320aic3x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/soc/codecs/tlv320aic3x.c') diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 6c43c13f043..c3d96fc8c26 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, static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); + struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); + struct snd_soc_dapm_widget *widget = wlist->widgets[0]; struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; unsigned int reg = mc->reg; -- cgit v1.2.3-70-g09d2