summaryrefslogtreecommitdiff
path: root/drivers/regulator/wm8994-regulator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-31 15:01:12 +0400
committerMark Brown <broonie@linaro.org>2013-09-17 03:27:55 +0400
commit9e2bfbbdf203c954a306a5e402a84c24622c55b0 (patch)
treeb16394aae142c164162fd2a71ca60dd767be572d /drivers/regulator/wm8994-regulator.c
parenteb8b3c8360408b78ca99492f8c1fec080c75dd71 (diff)
downloadlinux-9e2bfbbdf203c954a306a5e402a84c24622c55b0.tar.xz
regulator: wm8994: Convert to devm_regulator_register
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/wm8994-regulator.c')
-rw-r--r--drivers/regulator/wm8994-regulator.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c
index 5ee2a208457c..71c5911f2e71 100644
--- a/drivers/regulator/wm8994-regulator.c
+++ b/drivers/regulator/wm8994-regulator.c
@@ -165,7 +165,9 @@ static int wm8994_ldo_probe(struct platform_device *pdev)
ldo->init_data = *pdata->ldo[id].init_data;
}
- ldo->regulator = regulator_register(&wm8994_ldo_desc[id], &config);
+ ldo->regulator = devm_regulator_register(&pdev->dev,
+ &wm8994_ldo_desc[id],
+ &config);
if (IS_ERR(ldo->regulator)) {
ret = PTR_ERR(ldo->regulator);
dev_err(wm8994->dev, "Failed to register LDO%d: %d\n",
@@ -181,18 +183,8 @@ err:
return ret;
}
-static int wm8994_ldo_remove(struct platform_device *pdev)
-{
- struct wm8994_ldo *ldo = platform_get_drvdata(pdev);
-
- regulator_unregister(ldo->regulator);
-
- return 0;
-}
-
static struct platform_driver wm8994_ldo_driver = {
.probe = wm8994_ldo_probe,
- .remove = wm8994_ldo_remove,
.driver = {
.name = "wm8994-ldo",
.owner = THIS_MODULE,