From b2c2271c826589c5c5b285a5a32e158d36d263d9 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Fri, 7 Oct 2011 22:40:41 +0300 Subject: [PATCH] usb: dwc3: gadget: don't disable endpoints on exit when we remove the gadget driver, it will already do that for us. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 25dbd8614e72..46ed15bca19f 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -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, -- 2.30.2