summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max8925-regulator.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-30 09:56:24 +0900
committerMark Brown <broonie@linaro.org>2013-09-30 18:10:59 +0100
commit58765e24bec8940082068829a9d2c3a4431d60c0 (patch)
tree0d03a74a2e18de75cf7a1bbd7e0fe23cd7a33bb9 /drivers/regulator/max8925-regulator.c
parent0b7bb09054aebe66fd803c8f88015046b96cb47f (diff)
downloadtalos-obmc-linux-58765e24bec8940082068829a9d2c3a4431d60c0.tar.gz
talos-obmc-linux-58765e24bec8940082068829a9d2c3a4431d60c0.zip
regulator: max8925: use devm_regulator_register()
Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/max8925-regulator.c')
-rw-r--r--drivers/regulator/max8925-regulator.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c
index d80b5fa758ae..759510789e71 100644
--- a/drivers/regulator/max8925-regulator.c
+++ b/drivers/regulator/max8925-regulator.c
@@ -312,7 +312,7 @@ static int max8925_regulator_probe(struct platform_device *pdev)
if (pdata)
config.init_data = pdata;
- 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);
@@ -323,22 +323,12 @@ static int max8925_regulator_probe(struct platform_device *pdev)
return 0;
}
-static int max8925_regulator_remove(struct platform_device *pdev)
-{
- struct regulator_dev *rdev = platform_get_drvdata(pdev);
-
- regulator_unregister(rdev);
-
- return 0;
-}
-
static struct platform_driver max8925_regulator_driver = {
.driver = {
.name = "max8925-regulator",
.owner = THIS_MODULE,
},
.probe = max8925_regulator_probe,
- .remove = max8925_regulator_remove,
};
static int __init max8925_regulator_init(void)
OpenPOWER on IntegriCloud