diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-08 22:21:16 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-09 00:07:19 -0400 |
commit | 7d116684945459e98538c797dca37c54ddd89906 (patch) | |
tree | f9a971b57ed85c937e4ee67420df8c38281f3e03 /sound/soc/codecs/wm8903.c | |
parent | 0f163546a772d62250f59bad6a9338a0e3a2605c (diff) |
ASoC: wm8903: Convert to devm_regmap_init_i2c()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8903.c')
-rw-r--r-- | sound/soc/codecs/wm8903.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 304b5cff3482..3abd450842ee 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
@@ -2124,7 +2124,7 @@ static __devinit int wm8903_i2c_probe(struct i2c_client *i2c, | |||
2124 | return -ENOMEM; | 2124 | return -ENOMEM; |
2125 | wm8903->dev = &i2c->dev; | 2125 | wm8903->dev = &i2c->dev; |
2126 | 2126 | ||
2127 | wm8903->regmap = regmap_init_i2c(i2c, &wm8903_regmap); | 2127 | wm8903->regmap = devm_regmap_init_i2c(i2c, &wm8903_regmap); |
2128 | if (IS_ERR(wm8903->regmap)) { | 2128 | if (IS_ERR(wm8903->regmap)) { |
2129 | ret = PTR_ERR(wm8903->regmap); | 2129 | ret = PTR_ERR(wm8903->regmap); |
2130 | dev_err(&i2c->dev, "Failed to allocate register map: %d\n", | 2130 | dev_err(&i2c->dev, "Failed to allocate register map: %d\n", |
@@ -2191,7 +2191,6 @@ static __devinit int wm8903_i2c_probe(struct i2c_client *i2c, | |||
2191 | 2191 | ||
2192 | return 0; | 2192 | return 0; |
2193 | err: | 2193 | err: |
2194 | regmap_exit(wm8903->regmap); | ||
2195 | return ret; | 2194 | return ret; |
2196 | } | 2195 | } |
2197 | 2196 | ||
@@ -2200,7 +2199,6 @@ static __devexit int wm8903_i2c_remove(struct i2c_client *client) | |||
2200 | struct wm8903_priv *wm8903 = i2c_get_clientdata(client); | 2199 | struct wm8903_priv *wm8903 = i2c_get_clientdata(client); |
2201 | 2200 | ||
2202 | wm8903_free_gpio(wm8903); | 2201 | wm8903_free_gpio(wm8903); |
2203 | regmap_exit(wm8903->regmap); | ||
2204 | snd_soc_unregister_codec(&client->dev); | 2202 | snd_soc_unregister_codec(&client->dev); |
2205 | 2203 | ||
2206 | return 0; | 2204 | return 0; |