usb: gadget: atmel_usba_udc: use udc-core's reset notifier
authorPeter Chen <peter.chen@freescale.com>
Thu, 6 Nov 2014 06:28:09 +0000 (14:28 +0800)
committerFelipe Balbi <balbi@ti.com>
Mon, 10 Nov 2014 23:19:38 +0000 (17:19 -0600)
Replace usb_gadget_driver's disconnect with udc-core's reset notifier at
bus reset handler.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc/atmel_usba_udc.c

index c537a6604b4697788737d2eb123a122206bb78db..990b26f337382ae06887a5bf0b0b725e9d497776 100644 (file)
@@ -1685,11 +1685,10 @@ static irqreturn_t usba_udc_irq(int irq, void *devid)
                usba_writel(udc, INT_CLR, USBA_END_OF_RESET);
                reset_all_endpoints(udc);
 
-               if (udc->gadget.speed != USB_SPEED_UNKNOWN
-                               && udc->driver && udc->driver->disconnect) {
+               if (udc->gadget.speed != USB_SPEED_UNKNOWN && udc->driver) {
                        udc->gadget.speed = USB_SPEED_UNKNOWN;
                        spin_unlock(&udc->lock);
-                       udc->driver->disconnect(&udc->gadget);
+                       usb_gadget_udc_reset(&udc->gadget, udc->driver);
                        spin_lock(&udc->lock);
                }