[alsa-devel] [PATCH 1/2] ASoC: Don't use wm8994->control_data in wm8994_readable_register()
Mark Brown
broonie at opensource.wolfsonmicro.com
Fri Nov 4 16:53:47 CET 2011
The field is no longer initialised so this will crash if running on
wm8958.
Reported-by: Thomas Abraham <thomas.abraham at linaro.org>
Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm8994.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 6b73efd..3d2c3d4 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -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:
--
1.7.7.1
More information about the Alsa-devel
mailing list