]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
usb: dwc3: gadget: don't disable endpoints on exit
authorFelipe Balbi <balbi@ti.com>
Fri, 7 Oct 2011 19:40:41 +0000 (22:40 +0300)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Dec 2011 09:48:09 +0000 (11:48 +0200)
when we remove the gadget driver, it will already
do that for us.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c

index 25dbd8614e7226ccf915bfa30817226a10272f3c..46ed15bca19f468a914ded9cad9985a5712f6d9f 100644 (file)
@@ -2076,7 +2076,6 @@ err0:
 void dwc3_gadget_exit(struct dwc3 *dwc)
 {
        int                     irq;
-       int                     i;
 
        usb_del_gadget_udc(&dwc->gadget);
        irq = platform_get_irq(to_platform_device(dwc->dev), 0);
@@ -2084,9 +2083,6 @@ void dwc3_gadget_exit(struct dwc3 *dwc)
        dwc3_writel(dwc->regs, DWC3_DEVTEN, 0x00);
        free_irq(irq, dwc);
 
-       for (i = 0; i < ARRAY_SIZE(dwc->eps); i++)
-               __dwc3_gadget_ep_disable(dwc->eps[i]);
-
        dwc3_gadget_free_endpoints(dwc);
 
        dma_free_coherent(dwc->dev, 512, dwc->ep0_bounce,