Skip to content

Commit

Permalink
Input: i8042 - fix device removal on unload
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dtor committed Sep 1, 2010
1 parent 57157be commit af045b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/serio/i8042.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit af045b8

Please sign in to comment.