[alsa-devel] [PATCH 5/5] ASoC: wm8903: Convert to devm_regmap_init_i2c()
Mark Brown
broonie at opensource.wolfsonmicro.com
Sat Jun 9 05:09:56 CEST 2012
Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm8903.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 9410d54..676432d 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -2236,7 +2236,7 @@ static __devinit int wm8903_i2c_probe(struct i2c_client *i2c,
return -ENOMEM;
wm8903->dev = &i2c->dev;
- wm8903->regmap = regmap_init_i2c(i2c, &wm8903_regmap);
+ wm8903->regmap = devm_regmap_init_i2c(i2c, &wm8903_regmap);
if (IS_ERR(wm8903->regmap)) {
ret = PTR_ERR(wm8903->regmap);
dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
@@ -2403,7 +2403,6 @@ static __devinit int wm8903_i2c_probe(struct i2c_client *i2c,
return 0;
err:
- regmap_exit(wm8903->regmap);
return ret;
}
@@ -2414,7 +2413,6 @@ static __devexit int wm8903_i2c_remove(struct i2c_client *client)
if (client->irq)
free_irq(client->irq, wm8903);
wm8903_free_gpio(wm8903);
- regmap_exit(wm8903->regmap);
snd_soc_unregister_codec(&client->dev);
return 0;
--
1.7.10
More information about the Alsa-devel
mailing list