summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm2000.c
diff options
context:
space:
mode:
authorMark Brown2012-11-26 15:18:36 +0100
committerMark Brown2012-11-27 11:46:13 +0100
commita5ccea22247b8519e098d715ed69c4adbc171f0b (patch)
treee7ccbcc26a1569c6f0c47c3add7640ce50d024d1 /sound/soc/codecs/wm2000.c
parentLinux 3.7-rc6 (diff)
downloadkernel-qcow2-linux-a5ccea22247b8519e098d715ed69c4adbc171f0b.tar.gz
kernel-qcow2-linux-a5ccea22247b8519e098d715ed69c4adbc171f0b.tar.xz
kernel-qcow2-linux-a5ccea22247b8519e098d715ed69c4adbc171f0b.zip
ASoC: wm2000: Get the CODEC pointer from the widget
Don't rely on the kcontrol for robustness reasons, the widget mechanism is what the framework uses. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm2000.c')
-rw-r--r--sound/soc/codecs/wm2000.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index 683dc43b1d87..02750ab020de 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -646,7 +646,7 @@ static const struct snd_kcontrol_new wm2000_controls[] = {
static int wm2000_anc_power_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_codec *codec = w->codec;
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
if (SND_SOC_DAPM_EVENT_ON(event))