diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-09-30 09:55:12 +0900 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-30 18:10:59 +0100 |
commit | 3343fa174883b89c0151dac24df86e351eca85e4 (patch) | |
tree | b3a6eee505f1d242ab6c2811a694638fb23154b5 /drivers/regulator/lp8788-buck.c | |
parent | ed602534df5d07251c074bafe75feed643c588d1 (diff) |
regulator: lp8788-buck: 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/lp8788-buck.c')
-rw-r--r-- | drivers/regulator/lp8788-buck.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c index 0b015f2a7fd9..948afc249e29 100644 --- a/drivers/regulator/lp8788-buck.c +++ b/drivers/regulator/lp8788-buck.c @@ -515,7 +515,7 @@ static int lp8788_buck_probe(struct platform_device *pdev) cfg.driver_data = buck; cfg.regmap = lp->regmap; - rdev = regulator_register(&lp8788_buck_desc[id], &cfg); + rdev = devm_regulator_register(&pdev->dev, &lp8788_buck_desc[id], &cfg); if (IS_ERR(rdev)) { ret = PTR_ERR(rdev); dev_err(&pdev->dev, "BUCK%d regulator register err = %d\n", @@ -529,18 +529,8 @@ static int lp8788_buck_probe(struct platform_device *pdev) return 0; } -static int lp8788_buck_remove(struct platform_device *pdev) -{ - struct lp8788_buck *buck = platform_get_drvdata(pdev); - - regulator_unregister(buck->regulator); - - return 0; -} - static struct platform_driver lp8788_buck_driver = { .probe = lp8788_buck_probe, - .remove = lp8788_buck_remove, .driver = { .name = LP8788_DEV_BUCK, .owner = THIS_MODULE, |