Patchwork [U-Boot,V5,15/18] usb: gadget: mv_udc: clear desc upon ep_disable

login
register
mail settings
Submitter Troy Kisky
Date Sept. 26, 2013, 1:41 a.m.
Message ID <1380159678-26416-16-git-send-email-troy.kisky@boundarydevices.com>
Download mbox | patch
Permalink /patch/278076/
State Awaiting Upstream
Delegated to: Marek Vasut
Headers show

Comments

Troy Kisky - Sept. 26, 2013, 1:41 a.m.
desc is set at ep_enable, so for symmetry,
clear it at ep_disable.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>

---
v4: no change
v5: no change
---
 drivers/usb/gadget/mv_udc.c | 3 +++
 1 file changed, 3 insertions(+)
Marek Vasut - Sept. 27, 2013, 6:02 p.m.
Dear Troy Kisky,

> desc is set at ep_enable, so for symmetry,
> clear it at ep_disable.
> 
> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> 
Picking for -next, thanks

Best regards,
Marek Vasut

Patch

diff --git a/drivers/usb/gadget/mv_udc.c b/drivers/usb/gadget/mv_udc.c
index 091c566..bfe099b 100644
--- a/drivers/usb/gadget/mv_udc.c
+++ b/drivers/usb/gadget/mv_udc.c
@@ -261,6 +261,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;
 }