aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/amd5536udc.c
diff options
context:
space:
mode:
authorIdo Shayevitz <idos@codeaurora.org>2012-03-12 14:25:25 -0400
committerFelipe Balbi <balbi@ti.com>2012-05-04 08:52:52 -0400
commitef20a72b7372e5643b157bd61bbdcf0f6ed1e330 (patch)
treebe97608c9969ee679a4b99778f6c281a73ac9a53 /drivers/usb/gadget/amd5536udc.c
parent16e78db720baa9356485336ec137c7ee0a482a9b (diff)
usb: gadget: Update amd5536udc to use usb_endpoint_descriptor inside the struct usb_ep
Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/amd5536udc.c')
-rw-r--r--drivers/usb/gadget/amd5536udc.c13
1 files changed, 6 insertions, 7 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) {