projects/linux·commit af045b86

Input: i8042 - fix device removal on unload

af045b86 · Dmitry Torokhov <[email protected]> · 2010-08-31 17:27:02 -07:00

We need to call platform_device_unregister(i8042_platform_device)
before calling platform_driver_unregister() because i8042_remove()
resets i8042_platform_device to NULL. This leaves the platform device
instance behind and prevents driver reload.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=16613

Reported-by: Seryodkin Victor <[email protected]>
Cc: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
Commit
af045b86662f17bf130239a65995c61a34f00a6b
Parents
57157bec

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/input/serio/i8042.cmodified+1−1View file

drivers/input/serio/i8042.c

View file
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 46e4ba0..f585131 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1485,8 +1485,8 @@ static int __init i8042_init(void)
static void __exit i8042_exit(void)
{
- platform_driver_unregister(&i8042_driver);
platform_device_unregister(i8042_platform_device);
+ platform_driver_unregister(&i8042_driver);
i8042_platform_exit();
panic_blink = NULL;