summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/pcf50633-regulator.c
diff options
context:
space:
mode:
authorJingoo Han2013-09-30 02:57:23 +0200
committerMark Brown2013-09-30 19:11:00 +0200
commit5e0165e5a91db2283e694023582c0fc23311ae59 (patch)
tree522d5f3b9931b1a9f382f2bd0ab410d3a14fb930 /drivers/regulator/pcf50633-regulator.c
parentregulator: pcap: use devm_regulator_register() (diff)
downloadkernel-qcow2-linux-5e0165e5a91db2283e694023582c0fc23311ae59.tar.gz
kernel-qcow2-linux-5e0165e5a91db2283e694023582c0fc23311ae59.tar.xz
kernel-qcow2-linux-5e0165e5a91db2283e694023582c0fc23311ae59.zip
regulator: pcf50633: 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/pcf50633-regulator.c')
-rw-r--r--drivers/regulator/pcf50633-regulator.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/regulator/pcf50633-regulator.c b/drivers/regulator/pcf50633-regulator.c
index 0f3576d48abf..d7da1c15a6da 100644
--- a/drivers/regulator/pcf50633-regulator.c
+++ b/drivers/regulator/pcf50633-regulator.c
@@ -90,7 +90,8 @@ static int pcf50633_regulator_probe(struct platform_device *pdev)
config.driver_data = pcf;
config.regmap = pcf->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);
@@ -102,21 +103,11 @@ static int pcf50633_regulator_probe(struct platform_device *pdev)
return 0;
}
-static int pcf50633_regulator_remove(struct platform_device *pdev)
-{
- struct regulator_dev *rdev = platform_get_drvdata(pdev);
-
- regulator_unregister(rdev);
-
- return 0;
-}
-
static struct platform_driver pcf50633_regulator_driver = {
.driver = {
.name = "pcf50633-regltr",
},
.probe = pcf50633_regulator_probe,
- .remove = pcf50633_regulator_remove,
};
static int __init pcf50633_regulator_init(void)