summaryrefslogtreecommitdiff
path: root/drivers/regulator/arizona-ldo1.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-31 11:56:47 +0100
committerMark Brown <broonie@linaro.org>2013-09-17 00:27:54 +0100
commit14ffa8882bbd991497f2f87ce80382e5a1e6eb8f (patch)
tree980cf7b93f50643e757c7472b38527218492a8d4 /drivers/regulator/arizona-ldo1.c
parentb33e46bcdc4e598d738ed12a5a7906be4e11d786 (diff)
downloadlwn-14ffa8882bbd991497f2f87ce80382e5a1e6eb8f.tar.gz
lwn-14ffa8882bbd991497f2f87ce80382e5a1e6eb8f.zip
regulator: arizona-ldo1: Convert to devm_regulator_register()
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/arizona-ldo1.c')
-rw-r--r--drivers/regulator/arizona-ldo1.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/regulator/arizona-ldo1.c b/drivers/regulator/arizona-ldo1.c
index 81d8681c3195..4f6c2055f6b2 100644
--- a/drivers/regulator/arizona-ldo1.c
+++ b/drivers/regulator/arizona-ldo1.c
@@ -226,7 +226,7 @@ static int arizona_ldo1_probe(struct platform_device *pdev)
else
config.init_data = &ldo1->init_data;
- ldo1->regulator = regulator_register(desc, &config);
+ ldo1->regulator = devm_regulator_register(&pdev->dev, desc, &config);
if (IS_ERR(ldo1->regulator)) {
ret = PTR_ERR(ldo1->regulator);
dev_err(arizona->dev, "Failed to register LDO1 supply: %d\n",
@@ -239,18 +239,8 @@ static int arizona_ldo1_probe(struct platform_device *pdev)
return 0;
}
-static int arizona_ldo1_remove(struct platform_device *pdev)
-{
- struct arizona_ldo1 *ldo1 = platform_get_drvdata(pdev);
-
- regulator_unregister(ldo1->regulator);
-
- return 0;
-}
-
static struct platform_driver arizona_ldo1_driver = {
.probe = arizona_ldo1_probe,
- .remove = arizona_ldo1_remove,
.driver = {
.name = "arizona-ldo1",
.owner = THIS_MODULE,