Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a74857d authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Liam Girdwood
Browse files

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: default avatarDmitry Torokhov <dtor@mail.ru>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 308f100f
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -288,6 +288,7 @@ 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;
}
@@ -295,6 +296,7 @@ static int __devexit pcap_regulator_remove(struct platform_device *pdev)
static struct platform_driver pcap_regulator_driver = {
	.driver = {
		.name	= "pcap-regulator",
		.owner	= THIS_MODULE,
	},
	.probe	= pcap_regulator_probe,
	.remove	= __devexit_p(pcap_regulator_remove),