summaryrefslogtreecommitdiff
path: root/drivers/regulator/pcap-regulator.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-30 09:56:55 +0900
committerMark Brown <broonie@linaro.org>2013-09-30 18:11:00 +0100
commit15dc006af830d85417c97b60a40b5a0b991ee32e (patch)
tree39873892fb933e95db997949d103659cce2469ea /drivers/regulator/pcap-regulator.c
parent58765e24bec8940082068829a9d2c3a4431d60c0 (diff)
regulator: pcap: 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/pcap-regulator.c')
-rw-r--r--drivers/regulator/pcap-regulator.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/regulator/pcap-regulator.c b/drivers/regulator/pcap-regulator.c
index b49eaeedea84..3727b7d0e9ac 100644
--- a/drivers/regulator/pcap-regulator.c
+++ b/drivers/regulator/pcap-regulator.c
@@ -246,7 +246,8 @@ static int pcap_regulator_probe(struct platform_device *pdev)
config.init_data = dev_get_platdata(&pdev->dev);
config.driver_data = pcap;
- rdev = regulator_register(&pcap_regulators[pdev->id], &config);
+ rdev = devm_regulator_register(&pdev->dev, &pcap_regulators[pdev->id],
+ &config);
if (IS_ERR(rdev))
return PTR_ERR(rdev);
@@ -255,22 +256,12 @@ static int pcap_regulator_probe(struct platform_device *pdev)
return 0;
}
-static int pcap_regulator_remove(struct platform_device *pdev)
-{
- struct regulator_dev *rdev = platform_get_drvdata(pdev);
-
- regulator_unregister(rdev);
-
- return 0;
-}
-
static struct platform_driver pcap_regulator_driver = {
.driver = {
.name = "pcap-regulator",
.owner = THIS_MODULE,
},
.probe = pcap_regulator_probe,
- .remove = pcap_regulator_remove,
};
static int __init pcap_regulator_init(void)