dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Dmitry Torokhov 2010-02-23 23:38:33 -08:00 committed by Liam Girdwood
parent 308f100f2e
commit 6a74857d1b
1 changed files with 5 additions and 3 deletions

View File

@ -288,16 +288,18 @@ static int __devexit pcap_regulator_remove(struct platform_device *pdev)
struct regulator_dev *rdev = platform_get_drvdata(pdev);
regulator_unregister(rdev);
platform_set_drvdata(pdev, NULL);
return 0;
}
static struct platform_driver pcap_regulator_driver = {
.driver = {
.name = "pcap-regulator",
.name = "pcap-regulator",
.owner = THIS_MODULE,
},
.probe = pcap_regulator_probe,
.remove = __devexit_p(pcap_regulator_remove),
.probe = pcap_regulator_probe,
.remove = __devexit_p(pcap_regulator_remove),
};
static int __init pcap_regulator_init(void)