diff options
author | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
commit | 62b8c978ee6b8d135d9e7953221de58000dba986 (patch) | |
tree | 683b04b2e627f6710c22c151b23c8cc9a165315e /drivers/regulator/pcap-regulator.c | |
parent | 78fd82238d0e5716578c326404184a27ba67fd6e (diff) | |
download | linux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz |
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'drivers/regulator/pcap-regulator.c')
-rw-r--r-- | drivers/regulator/pcap-regulator.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/regulator/pcap-regulator.c b/drivers/regulator/pcap-regulator.c index 3727b7d..b49eaee 100644 --- a/drivers/regulator/pcap-regulator.c +++ b/drivers/regulator/pcap-regulator.c @@ -246,8 +246,7 @@ static int pcap_regulator_probe(struct platform_device *pdev) config.init_data = dev_get_platdata(&pdev->dev); config.driver_data = pcap; - rdev = devm_regulator_register(&pdev->dev, &pcap_regulators[pdev->id], - &config); + rdev = regulator_register(&pcap_regulators[pdev->id], &config); if (IS_ERR(rdev)) return PTR_ERR(rdev); @@ -256,12 +255,22 @@ 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) |