diff mbox

drivers:input:set the device's driver data to NULL when remove

Message ID 1311175076-7384-1-git-send-email-wanlong.gao@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wanlong Gao July 20, 2011, 3:17 p.m. UTC
Set the platform driver data ot NULL when the device
88pm860x-onkey is removed, it will be better.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
---
 drivers/input/misc/88pm860x_onkey.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/input/misc/88pm860x_onkey.c b/drivers/input/misc/88pm860x_onkey.c
index 3dca3c1..e1feb02 100644
--- a/drivers/input/misc/88pm860x_onkey.c
+++ b/drivers/input/misc/88pm860x_onkey.c
@@ -126,6 +126,9 @@  static int __devexit pm860x_onkey_remove(struct platform_device *pdev)
 	free_irq(info->irq, info);
 	input_unregister_device(info->idev);
 	kfree(info);
+
+	platform_set_drvdata(pdev, NULL);
+
 	return 0;
 }