aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8996.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-11 06:20:48 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-11 08:22:26 -0400
commitaf691fb62c626fe374955ab306092b09f672e27d (patch)
tree2e07e0243fc96293d966f19b4e6fed134594a062 /sound/soc/codecs/wm8996.c
parent66c2b7377a7cf22c48ebba7fdff5340ab492b7bc (diff)
ASoC: wm8996: Convert to devm_regmap_init_i2c()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8996.c')
-rw-r--r--sound/soc/codecs/wm8996.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index f24989f090ca..a6b5cffa498a 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -3000,7 +3000,7 @@ static __devinit int wm8996_i2c_probe(struct i2c_client *i2c,
3000 msleep(5); 3000 msleep(5);
3001 } 3001 }
3002 3002
3003 wm8996->regmap = regmap_init_i2c(i2c, &wm8996_regmap); 3003 wm8996->regmap = devm_regmap_init_i2c(i2c, &wm8996_regmap);
3004 if (IS_ERR(wm8996->regmap)) { 3004 if (IS_ERR(wm8996->regmap)) {
3005 ret = PTR_ERR(wm8996->regmap); 3005 ret = PTR_ERR(wm8996->regmap);
3006 dev_err(&i2c->dev, "regmap_init() failed: %d\n", ret); 3006 dev_err(&i2c->dev, "regmap_init() failed: %d\n", ret);
@@ -3049,7 +3049,6 @@ static __devinit int wm8996_i2c_probe(struct i2c_client *i2c,
3049err_gpiolib: 3049err_gpiolib:
3050 wm8996_free_gpio(wm8996); 3050 wm8996_free_gpio(wm8996);
3051err_regmap: 3051err_regmap:
3052 regmap_exit(wm8996->regmap);
3053err_enable: 3052err_enable:
3054 if (wm8996->pdata.ldo_ena > 0) 3053 if (wm8996->pdata.ldo_ena > 0)
3055 gpio_set_value_cansleep(wm8996->pdata.ldo_ena, 0); 3054 gpio_set_value_cansleep(wm8996->pdata.ldo_ena, 0);
@@ -3068,7 +3067,6 @@ static __devexit int wm8996_i2c_remove(struct i2c_client *client)
3068 3067
3069 snd_soc_unregister_codec(&client->dev); 3068 snd_soc_unregister_codec(&client->dev);
3070 wm8996_free_gpio(wm8996); 3069 wm8996_free_gpio(wm8996);
3071 regmap_exit(wm8996->regmap);
3072 if (wm8996->pdata.ldo_ena > 0) { 3070 if (wm8996->pdata.ldo_ena > 0) {
3073 gpio_set_value_cansleep(wm8996->pdata.ldo_ena, 0); 3071 gpio_set_value_cansleep(wm8996->pdata.ldo_ena, 0);
3074 gpio_free(wm8996->pdata.ldo_ena); 3072 gpio_free(wm8996->pdata.ldo_ena);