summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-09-03 14:19:00 +0800
committerMark Brown <broonie@linaro.org>2013-09-17 00:27:55 +0100
commitb1a613d505c53ad4f4af4cf228841a1784a50011 (patch)
tree8c0c04e49ca07f1c74ce4aeb8be60cf485f893bd
parentbcb5fe44875b09756c5e81925de19f9ca5bb9117 (diff)
downloadlinux-b1a613d505c53ad4f4af4cf228841a1784a50011.tar.bz2
regulator: aat2870: Convert to devm_regulator_register
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Jinyoung Park <jinyoungp@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--drivers/regulator/aat2870-regulator.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/regulator/aat2870-regulator.c b/drivers/regulator/aat2870-regulator.c
index 881159dfcb5e..f70a9bfa5ff2 100644
--- a/drivers/regulator/aat2870-regulator.c
+++ b/drivers/regulator/aat2870-regulator.c
@@ -176,7 +176,7 @@ static int aat2870_regulator_probe(struct platform_device *pdev)
config.driver_data = ri;
config.init_data = dev_get_platdata(&pdev->dev);
- rdev = regulator_register(&ri->desc, &config);
+ rdev = devm_regulator_register(&pdev->dev, &ri->desc, &config);
if (IS_ERR(rdev)) {
dev_err(&pdev->dev, "Failed to register regulator %s\n",
ri->desc.name);
@@ -187,21 +187,12 @@ static int aat2870_regulator_probe(struct platform_device *pdev)
return 0;
}
-static int aat2870_regulator_remove(struct platform_device *pdev)
-{
- struct regulator_dev *rdev = platform_get_drvdata(pdev);
-
- regulator_unregister(rdev);
- return 0;
-}
-
static struct platform_driver aat2870_regulator_driver = {
.driver = {
.name = "aat2870-regulator",
.owner = THIS_MODULE,
},
.probe = aat2870_regulator_probe,
- .remove = aat2870_regulator_remove,
};
static int __init aat2870_regulator_init(void)