Răsfoiți Sursa

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 <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Andrzej Pietrasiewicz 10 ani în urmă
părinte
comite
00896f66f5
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      drivers/usb/gadget/legacy/hid.c

+ 1 - 1
drivers/usb/gadget/legacy/hid.c

@@ -260,7 +260,7 @@ module_init(hidg_init);
 
 
 static void __exit hidg_cleanup(void)
 static void __exit hidg_cleanup(void)
 {
 {
-	platform_driver_unregister(&hidg_plat_driver);
 	usb_composite_unregister(&hidg_driver);
 	usb_composite_unregister(&hidg_driver);
+	platform_driver_unregister(&hidg_plat_driver);
 }
 }
 module_exit(hidg_cleanup);
 module_exit(hidg_cleanup);