Commit 532d0c6a authored by Andrew Morton's avatar Andrew Morton Committed by Greg Kroah-Hartman

[PATCH] USB: Fix hiddev devfs oops

From: Herbert Xu <herbert@gondor.apana.org.au>

There is a long-standing devfs_unregister oops in hid/hiddev.  It's caused
by hid calling hiddev_exit before unregistering itself which in turn calls
hiddev_disconnect.

hiddev_exit removes the directory which contains the hiddev devices.
Therefore it needs to be called after the hiddev devices have been
disconnected.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent e3fc695b
......@@ -1859,8 +1859,8 @@ static int __init hid_init(void)
static void __exit hid_exit(void)
{
hiddev_exit();
usb_deregister(&hid_driver);
hiddev_exit();
}
module_init(hid_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment