summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/wm8400-regulator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-31 12:00:57 +0100
committerMark Brown <broonie@linaro.org>2013-09-17 00:27:55 +0100
commiteb8b3c8360408b78ca99492f8c1fec080c75dd71 (patch)
tree46cf176fd9343a166fe04f8e858f02ad86a0bdad /drivers/regulator/wm8400-regulator.c
parente57e54693371fe1530f376c8a67c33d19bb2a0dc (diff)
regulator: wm8400: Convert to devm_regulator_register()
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/wm8400-regulator.c')
-rw-r--r--drivers/regulator/wm8400-regulator.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c
index 58f51bec13f..870b52f709b 100644
--- a/drivers/regulator/wm8400-regulator.c
+++ b/drivers/regulator/wm8400-regulator.c
@@ -219,7 +219,8 @@ static int wm8400_regulator_probe(struct platform_device *pdev)
config.driver_data = wm8400;
config.regmap = wm8400->regmap;
- rdev = regulator_register(&regulators[pdev->id], &config);
+ rdev = devm_regulator_register(&pdev->dev, &regulators[pdev->id],
+ &config);
if (IS_ERR(rdev))
return PTR_ERR(rdev);
@@ -228,21 +229,11 @@ static int wm8400_regulator_probe(struct platform_device *pdev)
return 0;
}
-static int wm8400_regulator_remove(struct platform_device *pdev)
-{
- struct regulator_dev *rdev = platform_get_drvdata(pdev);
-
- regulator_unregister(rdev);
-
- return 0;
-}
-
static struct platform_driver wm8400_regulator_driver = {
.driver = {
.name = "wm8400-regulator",
},
.probe = wm8400_regulator_probe,
- .remove = wm8400_regulator_remove,
};
/**