[U-Boot] [PATCH V3 20/20] usb: gadget: mv_udc: clear desc upon ep_disable

Troy Kisky
2013-08-01T23:27:37Z

desc is set at ep_enable, so for symmetry,
clear it at ep_disable.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
drivers/usb/gadget/mv_udc.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/usb/gadget/mv_udc.c b/drivers/usb/gadget/mv_udc.c
index 4876894..74fa065 100644
--- a/drivers/usb/gadget/mv_udc.c
+++ b/drivers/usb/gadget/mv_udc.c
@@ -276,6 +276,9 @@ static int mv_ep_enable(struct usb_ep *ep,

static int mv_ep_disable(struct usb_ep *ep)
{
+ struct mv_ep *mv_ep = container_of(ep, struct mv_ep, ep);
+
+ mv_ep->desc = NULL;
return 0;
}

--
1.8.1.2