aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lp8788-buck.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/lp8788-buck.c')
-rw-r--r--drivers/regulator/lp8788-buck.c12
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)
515 cfg.driver_data = buck; 515 cfg.driver_data = buck;
516 cfg.regmap = lp->regmap; 516 cfg.regmap = lp->regmap;
517 517
518 rdev = regulator_register(&lp8788_buck_desc[id], &cfg); 518 rdev = devm_regulator_register(&pdev->dev, &lp8788_buck_desc[id], &cfg);
519 if (IS_ERR(rdev)) { 519 if (IS_ERR(rdev)) {
520 ret = PTR_ERR(rdev); 520 ret = PTR_ERR(rdev);
521 dev_err(&pdev->dev, "BUCK%d regulator register err = %d\n", 521 dev_err(&pdev->dev, "BUCK%d regulator register err = %d\n",
@@ -529,18 +529,8 @@ static int lp8788_buck_probe(struct platform_device *pdev)
529 return 0; 529 return 0;
530} 530}
531 531
532static int lp8788_buck_remove(struct platform_device *pdev)
533{
534 struct lp8788_buck *buck = platform_get_drvdata(pdev);
535
536 regulator_unregister(buck->regulator);
537
538 return 0;
539}
540
541static struct platform_driver lp8788_buck_driver = { 532static struct platform_driver lp8788_buck_driver = {
542 .probe = lp8788_buck_probe, 533 .probe = lp8788_buck_probe,
543 .remove = lp8788_buck_remove,
544 .driver = { 534 .driver = {
545 .name = LP8788_DEV_BUCK, 535 .name = LP8788_DEV_BUCK,
546 .owner = THIS_MODULE, 536 .owner = THIS_MODULE,