From: Andrzej Pietrasiewicz Date: Thu, 6 Nov 2014 10:11:58 +0000 (+0100) Subject: usb: gadget: hid: mirror init operations in module cleanup X-Git-Tag: v3.19-rc1~80^2~32^2~82 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=00896f66f5032e5f53874a76e02cdad09f7ff90b;p=linux.git usb: gadget: hid: mirror init operations in module cleanup 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 Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/legacy/hid.c b/drivers/usb/gadget/legacy/hid.c index 778613eb37af..fba80a25260b 100644 --- a/drivers/usb/gadget/legacy/hid.c +++ b/drivers/usb/gadget/legacy/hid.c @@ -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);