Skip to content

Commit

Permalink
usb: dwc3: gadget: don't disable endpoints on exit
Browse files Browse the repository at this point in the history
when we remove the gadget driver, it will already
do that for us.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Dec 12, 2011
1 parent dc47ce9 commit b2c2271
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -2076,17 +2076,13 @@ int __devinit dwc3_gadget_init(struct dwc3 *dwc)
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);

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,
Expand Down

0 comments on commit b2c2271

Please sign in to comment.