Skip to content

Commit

Permalink
usb: udc-core: set gadget state as not attached after unloading module
Browse files Browse the repository at this point in the history
Set gadget state as "not attached" after unloading gadget module, or
its state will be unchanged after we unload gadget module.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Peter Chen authored and Felipe Balbi committed May 12, 2014
1 parent 6027f31 commit b5fb8d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/gadget/udc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
list_for_each_entry(udc, &udc_list, list)
if (udc->driver == driver) {
usb_gadget_remove_driver(udc);
usb_gadget_set_state(udc->gadget,
USB_STATE_NOTATTACHED);
ret = 0;
break;
}
Expand Down

0 comments on commit b5fb8d0

Please sign in to comment.