summaryrefslogtreecommitdiff
path: root/drivers/regulator/88pm8607.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-09-03 14:17:36 +0800
committerMark Brown <broonie@linaro.org>2013-09-17 00:27:55 +0100
commitbcb5fe44875b09756c5e81925de19f9ca5bb9117 (patch)
tree2737ee382c6127c9da1b7fb1121da4acec779807 /drivers/regulator/88pm8607.c
parent9e2bfbbdf203c954a306a5e402a84c24622c55b0 (diff)
regulator: 88pm8607: Convert to devm_regulator_register
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/88pm8607.c')
-rw-r--r--drivers/regulator/88pm8607.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index 70230974468c..f704d83c93c4 100644
--- a/drivers/regulator/88pm8607.c
+++ b/drivers/regulator/88pm8607.c
@@ -391,7 +391,8 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
else
config.regmap = chip->regmap_companion;
- info->regulator = regulator_register(&info->desc, &config);
+ info->regulator = devm_regulator_register(&pdev->dev, &info->desc,
+ &config);
if (IS_ERR(info->regulator)) {
dev_err(&pdev->dev, "failed to register regulator %s\n",
info->desc.name);
@@ -402,14 +403,6 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
return 0;
}
-static int pm8607_regulator_remove(struct platform_device *pdev)
-{
- struct pm8607_regulator_info *info = platform_get_drvdata(pdev);
-
- regulator_unregister(info->regulator);
- return 0;
-}
-
static struct platform_device_id pm8607_regulator_driver_ids[] = {
{
.name = "88pm860x-regulator",
@@ -428,7 +421,6 @@ static struct platform_driver pm8607_regulator_driver = {
.owner = THIS_MODULE,
},
.probe = pm8607_regulator_probe,
- .remove = pm8607_regulator_remove,
.id_table = pm8607_regulator_driver_ids,
};