diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-04-07 11:29:56 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-10 06:04:27 -0400 |
commit | 9a4bdd87a29bf297d9046410b011d726d51c3999 (patch) | |
tree | 2a7d853a64bbf8a5fd4dbbe333251c1d587b037a /drivers/regulator/tps62360-regulator.c | |
parent | dc553a7994e5492237562c7a5400e4b13111ff92 (diff) |
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.c | 4 |
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, | |||
320 | tps->desc.ops = &tps62360_dcdc_ops; | 320 | tps->desc.ops = &tps62360_dcdc_ops; |
321 | tps->desc.type = REGULATOR_VOLTAGE; | 321 | tps->desc.type = REGULATOR_VOLTAGE; |
322 | tps->desc.owner = THIS_MODULE; | 322 | tps->desc.owner = THIS_MODULE; |
323 | tps->regmap = regmap_init_i2c(client, &tps62360_regmap_config); | 323 | tps->regmap = devm_regmap_init_i2c(client, &tps62360_regmap_config); |
324 | if (IS_ERR(tps->regmap)) { | 324 | if (IS_ERR(tps->regmap)) { |
325 | ret = PTR_ERR(tps->regmap); | 325 | ret = PTR_ERR(tps->regmap); |
326 | dev_err(&client->dev, "%s() Err: Failed to allocate register" | 326 | dev_err(&client->dev, "%s() Err: Failed to allocate register" |
@@ -408,7 +408,6 @@ err_gpio1: | |||
408 | if (gpio_is_valid(tps->vsel0_gpio)) | 408 | if (gpio_is_valid(tps->vsel0_gpio)) |
409 | gpio_free(tps->vsel0_gpio); | 409 | gpio_free(tps->vsel0_gpio); |
410 | err_gpio0: | 410 | err_gpio0: |
411 | regmap_exit(tps->regmap); | ||
412 | return ret; | 411 | return ret; |
413 | } | 412 | } |
414 | 413 | ||
@@ -429,7 +428,6 @@ static int __devexit tps62360_remove(struct i2c_client *client) | |||
429 | gpio_free(tps->vsel0_gpio); | 428 | gpio_free(tps->vsel0_gpio); |
430 | 429 | ||
431 | regulator_unregister(tps->rdev); | 430 | regulator_unregister(tps->rdev); |
432 | regmap_exit(tps->regmap); | ||
433 | return 0; | 431 | return 0; |
434 | } | 432 | } |
435 | 433 | ||