diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-02-23 23:38:33 -0800 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-03-03 14:49:29 +0000 |
commit | 6a74857d1b75e4f58f1a09472b972058499258a4 (patch) | |
tree | 29055766da6a17519d708cb08d789c763b1fdc1b /drivers/regulator | |
parent | 308f100f2ef8e8b9f65b0f3c2a1c7044ec0e65a5 (diff) | |
download | op-kernel-dev-6a74857d1b75e4f58f1a09472b972058499258a4.zip op-kernel-dev-6a74857d1b75e4f58f1a09472b972058499258a4.tar.gz |
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.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/regulator/pcap-regulator.c b/drivers/regulator/pcap-regulator.c index 33d7d89..29d0566 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) 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) |