ASoC: Add missing regmap_init_i2c in wm8804_i2c_probe
authorAxel Lin <axel.lin@gmail.com>
Tue, 6 Mar 2012 07:06:53 +0000 (15:06 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 6 Mar 2012 12:22:11 +0000 (12:22 +0000)
commit 891271c "ASoC: Convert wm8804 to direct regmap API usage"
only converts wm8804_spi_probe to use regmap_init_spi.

This patch adds missing regmap_init_i2c in wm8804_i2c_probe.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8804.c

index 7ee8dcf1fe32c7e7848cf3d2f4fde78f7f668c7e..6bd1b767b138881eecb66451d9b468309b650d29 100644 (file)
@@ -755,6 +755,12 @@ static __devinit int wm8804_i2c_probe(struct i2c_client *i2c,
        if (!wm8804)
                return -ENOMEM;
 
+       wm8804->regmap = regmap_init_i2c(i2c, &wm8804_regmap_config);
+       if (IS_ERR(wm8804->regmap)) {
+               ret = PTR_ERR(wm8804->regmap);
+               return ret;
+       }
+
        i2c_set_clientdata(i2c, wm8804);
 
        ret = snd_soc_register_codec(&i2c->dev,