aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps6105x-regulator.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-30 09:57:54 +0900
committerMark Brown <broonie@linaro.org>2013-09-30 18:11:00 +0100
commit6a2b5a931f31c91cc2e261d99af7b3d881a41d86 (patch)
treeb8edb3ec7d24850c4b5df2738e340f50f61ac665 /drivers/regulator/tps6105x-regulator.c
parentregulator: pcf50633: use devm_regulator_register() (diff)
downloadlinux-dev-6a2b5a931f31c91cc2e261d99af7b3d881a41d86.tar.xz
linux-dev-6a2b5a931f31c91cc2e261d99af7b3d881a41d86.zip
regulator: tps6105x: 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> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/tps6105x-regulator.c')
-rw-r--r--drivers/regulator/tps6105x-regulator.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/regulator/tps6105x-regulator.c b/drivers/regulator/tps6105x-regulator.c
index ec9453ffb77f..e0e818d89f46 100644
--- a/drivers/regulator/tps6105x-regulator.c
+++ b/drivers/regulator/tps6105x-regulator.c
@@ -146,8 +146,9 @@ static int tps6105x_regulator_probe(struct platform_device *pdev)
config.driver_data = tps6105x;
/* Register regulator with framework */
- tps6105x->regulator = regulator_register(&tps6105x_regulator_desc,
- &config);
+ tps6105x->regulator = devm_regulator_register(&pdev->dev,
+ &tps6105x_regulator_desc,
+ &config);
if (IS_ERR(tps6105x->regulator)) {
ret = PTR_ERR(tps6105x->regulator);
dev_err(&tps6105x->client->dev,
@@ -159,20 +160,12 @@ static int tps6105x_regulator_probe(struct platform_device *pdev)
return 0;
}
-static int tps6105x_regulator_remove(struct platform_device *pdev)
-{
- struct tps6105x *tps6105x = dev_get_platdata(&pdev->dev);
- regulator_unregister(tps6105x->regulator);
- return 0;
-}
-
static struct platform_driver tps6105x_regulator_driver = {
.driver = {
.name = "tps6105x-regulator",
.owner = THIS_MODULE,
},
.probe = tps6105x_regulator_probe,
- .remove = tps6105x_regulator_remove,
};
static __init int tps6105x_regulator_init(void)