ASoC: adau1701: Initialize codec->control_data before using it
authorAxel Lin <axel.lin@gmail.com>
Wed, 28 Sep 2011 07:21:28 +0000 (15:21 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 28 Sep 2011 08:58:06 +0000 (09:58 +0100)
Currently codec->control_data is not initialized before calling
process_sigma_firmware(codec->control_data, ADAU1701_FIRMWARE).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/adau1701.c

index 2758d5fc60d6555ed2709e43afa25a4fe02865d4..b400afad12e012f8dbaf7a5187d7b6e802f57cf0 100644 (file)
@@ -458,6 +458,7 @@ static int adau1701_probe(struct snd_soc_codec *codec)
        int ret;
 
        codec->dapm.idle_bias_off = 1;
+       codec->control_data = to_i2c_client(codec->dev);
 
        ret = adau1701_load_firmware(codec);
        if (ret)