diff options
-rw-r--r-- | drivers/usb/gadget/amd5536udc.c | 13 | ||||
-rw-r--r-- | drivers/usb/gadget/amd5536udc.h | 1 |
2 files changed, 6 insertions, 8 deletions
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c index e6bb1071cfe3..187d21181cd5 100644 --- a/drivers/usb/gadget/amd5536udc.c +++ b/drivers/usb/gadget/amd5536udc.c | |||
@@ -333,7 +333,7 @@ udc_ep_enable(struct usb_ep *usbep, const struct usb_endpoint_descriptor *desc) | |||
333 | return -ESHUTDOWN; | 333 | return -ESHUTDOWN; |
334 | 334 | ||
335 | spin_lock_irqsave(&dev->lock, iflags); | 335 | spin_lock_irqsave(&dev->lock, iflags); |
336 | ep->desc = desc; | 336 | ep->ep.desc = desc; |
337 | 337 | ||
338 | ep->halted = 0; | 338 | ep->halted = 0; |
339 | 339 | ||
@@ -442,7 +442,6 @@ static void ep_init(struct udc_regs __iomem *regs, struct udc_ep *ep) | |||
442 | u32 tmp; | 442 | u32 tmp; |
443 | 443 | ||
444 | VDBG(ep->dev, "ep-%d reset\n", ep->num); | 444 | VDBG(ep->dev, "ep-%d reset\n", ep->num); |
445 | ep->desc = NULL; | ||
446 | ep->ep.desc = NULL; | 445 | ep->ep.desc = NULL; |
447 | ep->ep.ops = &udc_ep_ops; | 446 | ep->ep.ops = &udc_ep_ops; |
448 | INIT_LIST_HEAD(&ep->queue); | 447 | INIT_LIST_HEAD(&ep->queue); |
@@ -489,7 +488,7 @@ static int udc_ep_disable(struct usb_ep *usbep) | |||
489 | return -EINVAL; | 488 | return -EINVAL; |
490 | 489 | ||
491 | ep = container_of(usbep, struct udc_ep, ep); | 490 | ep = container_of(usbep, struct udc_ep, ep); |
492 | if (usbep->name == ep0_string || !ep->desc) | 491 | if (usbep->name == ep0_string || !ep->ep.desc) |
493 | return -EINVAL; | 492 | return -EINVAL; |
494 | 493 | ||
495 | DBG(ep->dev, "Disable ep-%d\n", ep->num); | 494 | DBG(ep->dev, "Disable ep-%d\n", ep->num); |
@@ -1066,7 +1065,7 @@ udc_queue(struct usb_ep *usbep, struct usb_request *usbreq, gfp_t gfp) | |||
1066 | return -EINVAL; | 1065 | return -EINVAL; |
1067 | 1066 | ||
1068 | ep = container_of(usbep, struct udc_ep, ep); | 1067 | ep = container_of(usbep, struct udc_ep, ep); |
1069 | if (!ep->desc && (ep->num != 0 && ep->num != UDC_EP0OUT_IX)) | 1068 | if (!ep->ep.desc && (ep->num != 0 && ep->num != UDC_EP0OUT_IX)) |
1070 | return -EINVAL; | 1069 | return -EINVAL; |
1071 | 1070 | ||
1072 | VDBG(ep->dev, "udc_queue(): ep%d-in=%d\n", ep->num, ep->in); | 1071 | VDBG(ep->dev, "udc_queue(): ep%d-in=%d\n", ep->num, ep->in); |
@@ -1257,7 +1256,7 @@ static int udc_dequeue(struct usb_ep *usbep, struct usb_request *usbreq) | |||
1257 | unsigned long iflags; | 1256 | unsigned long iflags; |
1258 | 1257 | ||
1259 | ep = container_of(usbep, struct udc_ep, ep); | 1258 | ep = container_of(usbep, struct udc_ep, ep); |
1260 | if (!usbep || !usbreq || (!ep->desc && (ep->num != 0 | 1259 | if (!usbep || !usbreq || (!ep->ep.desc && (ep->num != 0 |
1261 | && ep->num != UDC_EP0OUT_IX))) | 1260 | && ep->num != UDC_EP0OUT_IX))) |
1262 | return -EINVAL; | 1261 | return -EINVAL; |
1263 | 1262 | ||
@@ -1317,7 +1316,7 @@ udc_set_halt(struct usb_ep *usbep, int halt) | |||
1317 | pr_debug("set_halt %s: halt=%d\n", usbep->name, halt); | 1316 | pr_debug("set_halt %s: halt=%d\n", usbep->name, halt); |
1318 | 1317 | ||
1319 | ep = container_of(usbep, struct udc_ep, ep); | 1318 | ep = container_of(usbep, struct udc_ep, ep); |
1320 | if (!ep->desc && (ep->num != 0 && ep->num != UDC_EP0OUT_IX)) | 1319 | if (!ep->ep.desc && (ep->num != 0 && ep->num != UDC_EP0OUT_IX)) |
1321 | return -EINVAL; | 1320 | return -EINVAL; |
1322 | if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN) | 1321 | if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN) |
1323 | return -ESHUTDOWN; | 1322 | return -ESHUTDOWN; |
@@ -1539,7 +1538,7 @@ static void udc_setup_endpoints(struct udc *dev) | |||
1539 | * disabling ep interrupts when ENUM interrupt occurs but ep is | 1538 | * disabling ep interrupts when ENUM interrupt occurs but ep is |
1540 | * not enabled by gadget driver | 1539 | * not enabled by gadget driver |
1541 | */ | 1540 | */ |
1542 | if (!ep->desc) | 1541 | if (!ep->ep.desc) |
1543 | ep_init(dev->regs, ep); | 1542 | ep_init(dev->regs, ep); |
1544 | 1543 | ||
1545 | if (use_dma) { | 1544 | if (use_dma) { |
diff --git a/drivers/usb/gadget/amd5536udc.h b/drivers/usb/gadget/amd5536udc.h index f87e29c65325..14af87d65caa 100644 --- a/drivers/usb/gadget/amd5536udc.h +++ b/drivers/usb/gadget/amd5536udc.h | |||
@@ -512,7 +512,6 @@ struct udc_ep { | |||
512 | 512 | ||
513 | /* queue for requests */ | 513 | /* queue for requests */ |
514 | struct list_head queue; | 514 | struct list_head queue; |
515 | const struct usb_endpoint_descriptor *desc; | ||
516 | unsigned halted; | 515 | unsigned halted; |
517 | unsigned cancel_transfer; | 516 | unsigned cancel_transfer; |
518 | unsigned num : 5, | 517 | unsigned num : 5, |