aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/at91_udc.c
diff options
context:
space:
mode:
authorIdo Shayevitz <idos@codeaurora.org>2012-02-08 06:56:48 -0500
committerFelipe Balbi <balbi@ti.com>2012-02-24 05:22:38 -0500
commitf9c56cdd3905c96c600456203637bd7ec8ec6383 (patch)
treecfa0cd39d0798a0c3e4b57bf2ce3e9e75922c769 /drivers/usb/gadget/at91_udc.c
parenta003c187cac7a88101fe7f254bde6582865f7908 (diff)
usb: gadget: Clear usb_endpoint_descriptor inside the struct usb_ep on disable
This fix a bug in f_serial, which expect the ep->desc to be NULL after disabling an endpoint. Cc: stable@vger.kernel.org Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/at91_udc.c')
-rw-r--r--drivers/usb/gadget/at91_udc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index d8dee225bf8e..15a8cdb2ded5 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -557,6 +557,7 @@ static int at91_ep_disable (struct usb_ep * _ep)
557 557
558 /* restore the endpoint's pristine config */ 558 /* restore the endpoint's pristine config */
559 ep->desc = NULL; 559 ep->desc = NULL;
560 ep->ep.desc = NULL;
560 ep->ep.maxpacket = ep->maxpacket; 561 ep->ep.maxpacket = ep->maxpacket;
561 562
562 /* reset fifos and endpoint */ 563 /* reset fifos and endpoint */