aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-02-24 02:38:33 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-03-03 09:49:29 -0500
commit6a74857d1b75e4f58f1a09472b972058499258a4 (patch)
tree29055766da6a17519d708cb08d789c763b1fdc1b /drivers/regulator
parent308f100f2ef8e8b9f65b0f3c2a1c7044ec0e65a5 (diff)
Regulators: pcap-regulator - clean up driver data after removal
It is a good tone to reset driver data after unbinding the device. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/pcap-regulator.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/regulator/pcap-regulator.c b/drivers/regulator/pcap-regulator.c
index 33d7d899e030..29d0566379ae 100644
--- a/drivers/regulator/pcap-regulator.c
+++ b/drivers/regulator/pcap-regulator.c
@@ -288,16 +288,18 @@ static int __devexit pcap_regulator_remove(struct platform_device *pdev)
288 struct regulator_dev *rdev = platform_get_drvdata(pdev); 288 struct regulator_dev *rdev = platform_get_drvdata(pdev);
289 289
290 regulator_unregister(rdev); 290 regulator_unregister(rdev);
291 platform_set_drvdata(pdev, NULL);
291 292
292 return 0; 293 return 0;
293} 294}
294 295
295static struct platform_driver pcap_regulator_driver = { 296static struct platform_driver pcap_regulator_driver = {
296 .driver = { 297 .driver = {
297 .name = "pcap-regulator", 298 .name = "pcap-regulator",
299 .owner = THIS_MODULE,
298 }, 300 },
299 .probe = pcap_regulator_probe, 301 .probe = pcap_regulator_probe,
300 .remove = __devexit_p(pcap_regulator_remove), 302 .remove = __devexit_p(pcap_regulator_remove),
301}; 303};
302 304
303static int __init pcap_regulator_init(void) 305static int __init pcap_regulator_init(void)