diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-11-26 06:49:43 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-01 23:09:51 -0500 |
commit | c5e6f5fa0ad8e0d66cdb459a6193afc4f0ee8387 (patch) | |
tree | b9882d351466c8cc9c03e8f26f0edfc5947aa753 /sound/soc/codecs/wm8960.c | |
parent | 9489e9dcae718d5fde988e4a684a0f55b5f94d17 (diff) |
ASoC: wm8960: Use devm_regmap_init_i2c()
devm_regmap_init_i2c() is device managed and makes error
handling and code cleanup simpler. There was no explicit
regmap_exit call in this function which was probably a bug.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8960.c')
-rw-r--r-- | sound/soc/codecs/wm8960.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index f0f6f6601785..cf09cb625a7b 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c | |||
@@ -1040,7 +1040,7 @@ static __devinit int wm8960_i2c_probe(struct i2c_client *i2c, | |||
1040 | if (wm8960 == NULL) | 1040 | if (wm8960 == NULL) |
1041 | return -ENOMEM; | 1041 | return -ENOMEM; |
1042 | 1042 | ||
1043 | wm8960->regmap = regmap_init_i2c(i2c, &wm8960_regmap); | 1043 | wm8960->regmap = devm_regmap_init_i2c(i2c, &wm8960_regmap); |
1044 | if (IS_ERR(wm8960->regmap)) | 1044 | if (IS_ERR(wm8960->regmap)) |
1045 | return PTR_ERR(wm8960->regmap); | 1045 | return PTR_ERR(wm8960->regmap); |
1046 | 1046 | ||