summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_gadget.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-11-06 07:27:54 +0100
committerFelipe Balbi <balbi@ti.com>2014-11-11 00:19:34 +0100
commit1189f7f6dcf045ff970f619734420c6dd3d8526e (patch)
tree9f36d9f725ca52fc50060b6b7c1eed1c0123081a /drivers/usb/musb/musb_gadget.c
parentusb: dwc3: gadget: use udc-core's reset notifier (diff)
downloadlinux-1189f7f6dcf045ff970f619734420c6dd3d8526e.tar.xz
linux-1189f7f6dcf045ff970f619734420c6dd3d8526e.zip
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>
Diffstat (limited to 'drivers/usb/musb/musb_gadget.c')
-rw-r--r--drivers/usb/musb/musb_gadget.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 56c31b769a54..49b04cb6f5ca 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -2083,9 +2083,12 @@ __acquires(musb->lock)
: NULL
);
- /* report disconnect, if we didn't already (flushing EP state) */
- if (musb->g.speed != USB_SPEED_UNKNOWN)
- musb_g_disconnect(musb);
+ /* report reset, if we didn't already (flushing EP state) */
+ if (musb->gadget_driver && musb->g.speed != USB_SPEED_UNKNOWN) {
+ spin_unlock(&musb->lock);
+ usb_gadget_udc_reset(&musb->g, musb->gadget_driver);
+ spin_lock(&musb->lock);
+ }
/* clear HR */
else if (devctl & MUSB_DEVCTL_HR)