summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps62360-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-07 23:29:56 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-10 11:04:27 +0100
commit9a4bdd87a29bf297d9046410b011d726d51c3999 (patch)
tree2a7d853a64bbf8a5fd4dbbe333251c1d587b037a /drivers/regulator/tps62360-regulator.c
parentdc553a7994e5492237562c7a5400e4b13111ff92 (diff)
downloadlinux-9a4bdd87a29bf297d9046410b011d726d51c3999.tar.gz
linux-9a4bdd87a29bf297d9046410b011d726d51c3999.tar.bz2
linux-9a4bdd87a29bf297d9046410b011d726d51c3999.zip
regulator: tps62360: Convert to devm_regmap_init_i2c()
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/tps62360-regulator.c')
-rw-r--r--drivers/regulator/tps62360-regulator.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c
index 8fffc6e45b3a..0657c98352de 100644
--- a/drivers/regulator/tps62360-regulator.c
+++ b/drivers/regulator/tps62360-regulator.c
@@ -320,7 +320,7 @@ static int __devinit tps62360_probe(struct i2c_client *client,
tps->desc.ops = &tps62360_dcdc_ops;
tps->desc.type = REGULATOR_VOLTAGE;
tps->desc.owner = THIS_MODULE;
- tps->regmap = regmap_init_i2c(client, &tps62360_regmap_config);
+ tps->regmap = devm_regmap_init_i2c(client, &tps62360_regmap_config);
if (IS_ERR(tps->regmap)) {
ret = PTR_ERR(tps->regmap);
dev_err(&client->dev, "%s() Err: Failed to allocate register"
@@ -408,7 +408,6 @@ err_gpio1:
if (gpio_is_valid(tps->vsel0_gpio))
gpio_free(tps->vsel0_gpio);
err_gpio0:
- regmap_exit(tps->regmap);
return ret;
}
@@ -429,7 +428,6 @@ static int __devexit tps62360_remove(struct i2c_client *client)
gpio_free(tps->vsel0_gpio);
regulator_unregister(tps->rdev);
- regmap_exit(tps->regmap);
return 0;
}