]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Input: i8042 - fix device removal on unload
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 1 Sep 2010 00:27:02 +0000 (17:27 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:17:54 +0000 (13:17 -0700)
commit af045b86662f17bf130239a65995c61a34f00a6b upstream.

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 <vvscore@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/input/serio/i8042.c

index 1df02d25aca5e4843cc6b02988f93dc0c05f2803..16f5ab2ee034be2a24b087e175ba4ea4e1d6bb17 100644 (file)
@@ -1412,8 +1412,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;