summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/da9210-regulator.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-30 09:53:57 +0900
committerMark Brown <broonie@linaro.org>2013-09-30 18:11:30 +0100
commit11c0da7bb414505ff9a157af2b1301877a3726bd (patch)
tree1e64a2fbc8ac53d5737f160dcb14f016b3c73566 /drivers/regulator/da9210-regulator.c
parent21a122b5f433cf58dd4cc7d8f284853bf9b17ad1 (diff)
downloadop-kernel-dev-11c0da7bb414505ff9a157af2b1301877a3726bd.zip
op-kernel-dev-11c0da7bb414505ff9a157af2b1301877a3726bd.tar.gz
regulator: da9210: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/da9210-regulator.c')
-rw-r--r--drivers/regulator/da9210-regulator.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c
index f7ccff1..6f5ecbe 100644
--- a/drivers/regulator/da9210-regulator.c
+++ b/drivers/regulator/da9210-regulator.c
@@ -155,7 +155,7 @@ static int da9210_i2c_probe(struct i2c_client *i2c,
config.regmap = chip->regmap;
config.of_node = dev->of_node;
- rdev = regulator_register(&da9210_reg, &config);
+ rdev = devm_regulator_register(&i2c->dev, &da9210_reg, &config);
if (IS_ERR(rdev)) {
dev_err(&i2c->dev, "Failed to register DA9210 regulator\n");
return PTR_ERR(rdev);
@@ -168,13 +168,6 @@ static int da9210_i2c_probe(struct i2c_client *i2c,
return 0;
}
-static int da9210_i2c_remove(struct i2c_client *i2c)
-{
- struct da9210 *chip = i2c_get_clientdata(i2c);
- regulator_unregister(chip->rdev);
- return 0;
-}
-
static const struct i2c_device_id da9210_i2c_id[] = {
{"da9210", 0},
{},
@@ -188,7 +181,6 @@ static struct i2c_driver da9210_regulator_driver = {
.owner = THIS_MODULE,
},
.probe = da9210_i2c_probe,
- .remove = da9210_i2c_remove,
.id_table = da9210_i2c_id,
};
OpenPOWER on IntegriCloud