Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: i8042 - fix device removal on unload

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>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

+1 -1
+1 -1
drivers/input/serio/i8042.c
··· 1485 1485 1486 1486 static void __exit i8042_exit(void) 1487 1487 { 1488 - platform_driver_unregister(&i8042_driver); 1489 1488 platform_device_unregister(i8042_platform_device); 1489 + platform_driver_unregister(&i8042_driver); 1490 1490 i8042_platform_exit(); 1491 1491 1492 1492 panic_blink = NULL;