diff options
author | Ido Shayevitz <idos@codeaurora.org> | 2012-02-08 06:56:48 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-24 05:22:38 -0500 |
commit | f9c56cdd3905c96c600456203637bd7ec8ec6383 (patch) | |
tree | cfa0cd39d0798a0c3e4b57bf2ce3e9e75922c769 /drivers/usb/gadget/s3c2410_udc.c | |
parent | a003c187cac7a88101fe7f254bde6582865f7908 (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/s3c2410_udc.c')
-rw-r--r-- | drivers/usb/gadget/s3c2410_udc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index 3f87cb9344bb..ab9c65e2c1d5 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c | |||
@@ -1148,6 +1148,7 @@ static int s3c2410_udc_ep_disable(struct usb_ep *_ep) | |||
1148 | dprintk(DEBUG_NORMAL, "ep_disable: %s\n", _ep->name); | 1148 | dprintk(DEBUG_NORMAL, "ep_disable: %s\n", _ep->name); |
1149 | 1149 | ||
1150 | ep->desc = NULL; | 1150 | ep->desc = NULL; |
1151 | ep->ep.desc = NULL; | ||
1151 | ep->halted = 1; | 1152 | ep->halted = 1; |
1152 | 1153 | ||
1153 | s3c2410_udc_nuke (ep->dev, ep, -ESHUTDOWN); | 1154 | s3c2410_udc_nuke (ep->dev, ep, -ESHUTDOWN); |
@@ -1630,6 +1631,7 @@ static void s3c2410_udc_reinit(struct s3c2410_udc *dev) | |||
1630 | 1631 | ||
1631 | ep->dev = dev; | 1632 | ep->dev = dev; |
1632 | ep->desc = NULL; | 1633 | ep->desc = NULL; |
1634 | ep->ep.desc = NULL; | ||
1633 | ep->halted = 0; | 1635 | ep->halted = 0; |
1634 | INIT_LIST_HEAD (&ep->queue); | 1636 | INIT_LIST_HEAD (&ep->queue); |
1635 | } | 1637 | } |