ASoC: Don't use wm8994->control_data in wm8994_readable_register()
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 4 Nov 2011 15:52:31 +0000 (15:52 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 4 Nov 2011 23:24:58 +0000 (23:24 +0000)
The field is no longer initialised so this will crash if running on
wm8958.

Reported-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
sound/soc/codecs/wm8994.c

index 6b73efd269917367293021edde0f330ee7c3b722..3d2c3d4711d03c786b274956908b88994ed2e3e7 100644 (file)
@@ -56,7 +56,7 @@ static int wm8994_retune_mobile_base[] = {
 static int wm8994_readable(struct snd_soc_codec *codec, unsigned int reg)
 {
        struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
-       struct wm8994 *control = wm8994->control_data;
+       struct wm8994 *control = codec->control_data;
 
        switch (reg) {
        case WM8994_GPIO_1: