diff options
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 | ||