Commit 1189f7f6 authored by Felipe Balbi's avatar Felipe Balbi

usb: musb: gadget: use udc-core's reset notifier

Replace usb_gadget_driver's disconnect with udc-core's reset notifier at
bus reset handler.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 8e74475b
...@@ -2083,9 +2083,12 @@ __acquires(musb->lock) ...@@ -2083,9 +2083,12 @@ __acquires(musb->lock)
: NULL : NULL
); );
/* report disconnect, if we didn't already (flushing EP state) */ /* report reset, if we didn't already (flushing EP state) */
if (musb->g.speed != USB_SPEED_UNKNOWN) if (musb->gadget_driver && musb->g.speed != USB_SPEED_UNKNOWN) {
musb_g_disconnect(musb); spin_unlock(&musb->lock);
usb_gadget_udc_reset(&musb->g, musb->gadget_driver);
spin_lock(&musb->lock);
}
/* clear HR */ /* clear HR */
else if (devctl & MUSB_DEVCTL_HR) else if (devctl & MUSB_DEVCTL_HR)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment