提交 6a74857d 编写于 作者: D Dmitry Torokhov 提交者: Liam Girdwood

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: NDmitry Torokhov <dtor@mail.ru>
Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
上级 308f100f
...@@ -288,16 +288,18 @@ static int __devexit pcap_regulator_remove(struct platform_device *pdev) ...@@ -288,16 +288,18 @@ static int __devexit pcap_regulator_remove(struct platform_device *pdev)
struct regulator_dev *rdev = platform_get_drvdata(pdev); struct regulator_dev *rdev = platform_get_drvdata(pdev);
regulator_unregister(rdev); regulator_unregister(rdev);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }
static struct platform_driver pcap_regulator_driver = { static struct platform_driver pcap_regulator_driver = {
.driver = { .driver = {
.name = "pcap-regulator", .name = "pcap-regulator",
.owner = THIS_MODULE,
}, },
.probe = pcap_regulator_probe, .probe = pcap_regulator_probe,
.remove = __devexit_p(pcap_regulator_remove), .remove = __devexit_p(pcap_regulator_remove),
}; };
static int __init pcap_regulator_init(void) static int __init pcap_regulator_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册