diff options
author | Jarkko Nikula <jhnikula@gmail.com> | 2011-05-13 18:16:52 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-05-16 18:06:47 +0200 |
commit | 9d03545d886bedd2c81b8f28ae0cc68c356d02f7 (patch) | |
tree | bc1d7c1d2d94c4e4eba1c51bcf77f50e467bb21e /sound/soc/codecs/wm8995.c | |
parent | ASoC: Don't restart an already running WM8958 DSP2 (diff) | |
download | linux-9d03545d886bedd2c81b8f28ae0cc68c356d02f7.tar.xz linux-9d03545d886bedd2c81b8f28ae0cc68c356d02f7.zip |
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/wm8995.c')
-rw-r--r-- | sound/soc/codecs/wm8995.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c index 67eaaecbb42e..5ad873fda814 100644 --- a/sound/soc/codecs/wm8995.c +++ b/sound/soc/codecs/wm8995.c @@ -305,11 +305,11 @@ static int check_clk_sys(struct snd_soc_dapm_widget *source, static int wm8995_put_class_w(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_dapm_widget *w; + struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); + struct snd_soc_dapm_widget *w = wlist->widgets[0]; struct snd_soc_codec *codec; int ret; - w = snd_kcontrol_chip(kcontrol); codec = w->codec; ret = snd_soc_dapm_put_volsw(kcontrol, ucontrol); wm8995_update_class_w(codec); |