]> git.sur5r.net Git - u-boot/commitdiff
usb: musb: fill in usb_gadget_unregister_driver
authorRob Herring <robh@kernel.org>
Fri, 18 Apr 2014 13:54:30 +0000 (08:54 -0500)
committerMarek Vasut <marex@denx.de>
Wed, 30 Apr 2014 08:30:57 +0000 (10:30 +0200)
Add missing missing disconnect and unbind calls to the musb gadget driver's
usb_gadget_unregister_driver function. Otherwise, any gadget drivers fail
to uninitialize and run a 2nd time.

Signed-off-by: Rob Herring <robh@kernel.org>
drivers/usb/musb-new/musb_uboot.c

index 05126803c3f5175a9f72e7f3804bb89b56c38795..0d7b89fcf6e4e0fe0508c4afa0ffa4d329abcfba 100644 (file)
@@ -204,7 +204,10 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
 
 int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
 {
-       /* TODO: implement me */
+       if (driver->disconnect)
+               driver->disconnect(&gadget->g);
+       if (driver->unbind)
+               driver->unbind(&gadget->g);
        return 0;
 }
 #endif /* CONFIG_MUSB_GADGET */