aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8994.c
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2011-05-13 12:16:52 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-05-16 12:06:47 -0400
commit9d03545d886bedd2c81b8f28ae0cc68c356d02f7 (patch)
treebc1d7c1d2d94c4e4eba1c51bcf77f50e467bb21e /sound/soc/codecs/wm8994.c
parentfa63e477ddb09075f68cd5fe4db8f8045627a787 (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/wm8994.c')
-rw-r--r--sound/soc/codecs/wm8994.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index e6dfa103ad2a..970a95c5360b 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -877,7 +877,8 @@ static const char *hp_mux_text[] = {
877static int wm8994_put_hp_enum(struct snd_kcontrol *kcontrol, 877static int wm8994_put_hp_enum(struct snd_kcontrol *kcontrol,
878 struct snd_ctl_elem_value *ucontrol) 878 struct snd_ctl_elem_value *ucontrol)
879{ 879{
880 struct snd_soc_dapm_widget *w = snd_kcontrol_chip(kcontrol); 880 struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
881 struct snd_soc_dapm_widget *w = wlist->widgets[0];
881 struct snd_soc_codec *codec = w->codec; 882 struct snd_soc_codec *codec = w->codec;
882 int ret; 883 int ret;
883 884
@@ -1004,7 +1005,8 @@ SOC_DAPM_SINGLE("AIF1.1 Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING,
1004static int wm8994_put_class_w(struct snd_kcontrol *kcontrol, 1005static int wm8994_put_class_w(struct snd_kcontrol *kcontrol,
1005 struct snd_ctl_elem_value *ucontrol) 1006 struct snd_ctl_elem_value *ucontrol)
1006{ 1007{
1007 struct snd_soc_dapm_widget *w = snd_kcontrol_chip(kcontrol); 1008 struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
1009 struct snd_soc_dapm_widget *w = wlist->widgets[0];
1008 struct snd_soc_codec *codec = w->codec; 1010 struct snd_soc_codec *codec = w->codec;
1009 int ret; 1011 int ret;
1010 1012