summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2014-04-18 08:54:30 -0500
committerMarek Vasut <marex@denx.de>2014-04-30 10:30:57 +0200
commit078d7302ac9263e582d625c377c8289ae07436b7 (patch)
tree3ef31c110cb5250d332334a2e3bbfedd3a77834a
parent52d45012ff66dee716b8dfcb7d67d3ab54a3208a (diff)
downloadtalos-obmc-uboot-078d7302ac9263e582d625c377c8289ae07436b7.tar.gz
talos-obmc-uboot-078d7302ac9263e582d625c377c8289ae07436b7.zip
usb: musb: fill in usb_gadget_unregister_driver
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>
-rw-r--r--drivers/usb/musb-new/musb_uboot.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index 05126803c3..0d7b89fcf6 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -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 */
OpenPOWER on IntegriCloud