Skip to content

Commit

Permalink
usb: gadget: hid: mirror init operations in module cleanup
Browse files Browse the repository at this point in the history
So far platform driver has been unregistered first,
so just after that the usb composite is still available,
but there is no hid data any more.

Reverse the order so that first the usb composite becomes
unavailable and second the hid data goes away.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Andrzej Pietrasiewicz authored and Felipe Balbi committed Nov 6, 2014
1 parent 6340608 commit 00896f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/legacy/hid.c
Original file line number Diff line number Diff line change
@@ -260,7 +260,7 @@ module_init(hidg_init);

static void __exit hidg_cleanup(void)
{
platform_driver_unregister(&hidg_plat_driver);
usb_composite_unregister(&hidg_driver);
platform_driver_unregister(&hidg_plat_driver);
}
module_exit(hidg_cleanup);

0 comments on commit 00896f6

Please sign in to comment.