forked from Minki/linux
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: Felipe Balbi <balbi@ti.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
8e74475b0e
commit
1189f7f6dc
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user