Skip to content

Commit

Permalink
regulator: tps62360: Convert to devm_regmap_init_i2c()
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
AxelLin authored and broonie committed Apr 10, 2012
1 parent dc553a7 commit 9a4bdd8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/regulator/tps62360-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -408,7 +408,6 @@ static int __devinit tps62360_probe(struct i2c_client *client,
if (gpio_is_valid(tps->vsel0_gpio))
gpio_free(tps->vsel0_gpio);
err_gpio0:
regmap_exit(tps->regmap);
return ret;
}

Expand All @@ -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;
}

Expand Down

0 comments on commit 9a4bdd8

Please sign in to comment.