diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-08 23:26:01 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-09 00:07:41 -0400 |
commit | d633edd95dc938f3f5f0d4e431932f4ca042bffb (patch) | |
tree | 67d33c926fa0b5cbe0c8597b89eb2395fc8856fb /sound/soc/codecs/wm8904.c | |
parent | 8cb28fd6d1e98fe4cf232d7803093a3b7b46e969 (diff) |
ASoC: wm8904: Convert to devm_regmap_init_i2c()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8904.c')
-rw-r--r-- | sound/soc/codecs/wm8904.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 02bc2caac83a..560a9a47596b 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -2263,7 +2263,7 @@ static __devinit int wm8904_i2c_probe(struct i2c_client *i2c, | |||
2263 | if (wm8904 == NULL) | 2263 | if (wm8904 == NULL) |
2264 | return -ENOMEM; | 2264 | return -ENOMEM; |
2265 | 2265 | ||
2266 | wm8904->regmap = regmap_init_i2c(i2c, &wm8904_regmap); | 2266 | wm8904->regmap = devm_regmap_init_i2c(i2c, &wm8904_regmap); |
2267 | if (IS_ERR(wm8904->regmap)) { | 2267 | if (IS_ERR(wm8904->regmap)) { |
2268 | ret = PTR_ERR(wm8904->regmap); | 2268 | ret = PTR_ERR(wm8904->regmap); |
2269 | dev_err(&i2c->dev, "Failed to allocate register map: %d\n", | 2269 | dev_err(&i2c->dev, "Failed to allocate register map: %d\n", |
@@ -2283,15 +2283,12 @@ static __devinit int wm8904_i2c_probe(struct i2c_client *i2c, | |||
2283 | return 0; | 2283 | return 0; |
2284 | 2284 | ||
2285 | err: | 2285 | err: |
2286 | regmap_exit(wm8904->regmap); | ||
2287 | return ret; | 2286 | return ret; |
2288 | } | 2287 | } |
2289 | 2288 | ||
2290 | static __devexit int wm8904_i2c_remove(struct i2c_client *client) | 2289 | static __devexit int wm8904_i2c_remove(struct i2c_client *client) |
2291 | { | 2290 | { |
2292 | struct wm8904_priv *wm8904 = i2c_get_clientdata(client); | ||
2293 | snd_soc_unregister_codec(&client->dev); | 2291 | snd_soc_unregister_codec(&client->dev); |
2294 | regmap_exit(wm8904->regmap); | ||
2295 | return 0; | 2292 | return 0; |
2296 | } | 2293 | } |
2297 | 2294 | ||