Skip to content

Commit

Permalink
ASoC: wm8960: Use devm_regmap_init_i2c()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Mark Brown committed Dec 2, 2012
1 parent 9489e9d commit c5e6f5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm8960.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ static __devinit int wm8960_i2c_probe(struct i2c_client *i2c,
if (wm8960 == NULL)
return -ENOMEM;

wm8960->regmap = regmap_init_i2c(i2c, &wm8960_regmap);
wm8960->regmap = devm_regmap_init_i2c(i2c, &wm8960_regmap);
if (IS_ERR(wm8960->regmap))
return PTR_ERR(wm8960->regmap);

Expand Down

0 comments on commit c5e6f5f

Please sign in to comment.