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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set the platform driver data ot NULL when the device
88pm860x-onkey is removed, it will be better.

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

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;
 }
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux