/*-------------------------------------------------------------------------*/
#define is_in(ep) (((ep)->ep_num == 0) ? ((ep)->dev->ep0_dir == \
- USB_DIR_IN) : (usb_endpoint_dir_in((ep)->desc)))
+ USB_DIR_IN) : (usb_endpoint_dir_in((ep)->ep.desc)))
#define DIR_STRING(ep) (is_in(ep) ? "in" : "out")
dev = ep->dev;
dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__);
- if (!_ep || !desc || ep->desc
+ if (!_ep || !desc || ep->ep.desc
|| desc->bDescriptorType != USB_DT_ENDPOINT)
return -EINVAL;
spin_lock_irqsave(&dev->lock, flags);
ep->ep.maxpacket = max;
- ep->desc = desc;
+ ep->ep.desc = desc;
ep->stopped = 0;
ep->ep_num = usb_endpoint_num(desc);
ep->stopped = 1;
/* endpoint fifo flush */
- if (&ep->ep && ep->desc)
+ if (&ep->ep && ep->ep.desc)
langwell_ep_fifo_flush(&ep->ep);
while (!list_empty(&ep->queue)) {
dev = ep->dev;
dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__);
- if (!_ep || !ep->desc)
+ if (!_ep || !ep->ep.desc)
return -EINVAL;
spin_lock_irqsave(&dev->lock, flags);
/* nuke all pending requests (does flush) */
nuke(ep, -ESHUTDOWN);
- ep->desc = NULL;
ep->ep.desc = NULL;
ep->stopped = 1;
return -EINVAL;
}
- if (unlikely(!_ep || !ep->desc))
+ if (unlikely(!_ep || !ep->ep.desc))
return -EINVAL;
dev = ep->dev;
req->ep = ep;
dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__);
- if (usb_endpoint_xfer_isoc(ep->desc)) {
+ if (usb_endpoint_xfer_isoc(ep->ep.desc)) {
if (req->req.length > ep->ep.maxpacket)
return -EMSGSIZE;
is_iso = 1;
dev = ep->dev;
dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__);
- if (!_ep || !ep->desc || !_req)
+ if (!_ep || !ep->ep.desc || !_req)
return -EINVAL;
if (!dev->driver)
dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__);
- if (!_ep || !ep->desc)
+ if (!_ep || !ep->ep.desc)
return -EINVAL;
if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
return -ESHUTDOWN;
- if (usb_endpoint_xfer_isoc(ep->desc))
+ if (usb_endpoint_xfer_isoc(ep->ep.desc))
return -EOPNOTSUPP;
spin_lock_irqsave(&dev->lock, flags);
dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__);
- if (!_ep || !ep->desc)
+ if (!_ep || !ep->ep.desc)
return -EINVAL;
dev_vdbg(&dev->pdev->dev, "<--- %s()\n", __func__);
dev_vdbg(&dev->pdev->dev, "---> %s()\n", __func__);
- if (!_ep || !ep->desc) {
- dev_vdbg(&dev->pdev->dev, "ep or ep->desc is NULL\n");
+ if (!_ep || !ep->ep.desc) {
+ dev_vdbg(&dev->pdev->dev, "ep or ep->ep.desc is NULL\n");
dev_vdbg(&dev->pdev->dev, "<--- %s()\n", __func__);
return;
}
ep->stopped = 0;
ep->ep.maxpacket = EP0_MAX_PKT_SIZE;
ep->ep_num = 0;
- ep->desc = &langwell_ep0_desc;
+ ep->ep.desc = &langwell_ep0_desc;
INIT_LIST_HEAD(&ep->queue);
ep->ep_type = USB_ENDPOINT_XFER_CONTROL;
}
/* other gadget->eplist ep */
list_for_each_entry(ep, &dev->gadget.ep_list, ep.ep_list) {
- if (ep->desc) {
+ if (ep->ep.desc) {
t = scnprintf(next, size,
"\n%s MaxPacketSize: 0x%x, "
"ep_num: %d\n",
list_for_each_entry(ep, &dev->gadget.ep_list, ep.ep_list) {
u8 bEndpointAddress;
- if (!ep->desc)
+ if (!ep->ep.desc)
continue;
- bEndpointAddress = ep->desc->bEndpointAddress;
+ bEndpointAddress = ep->ep.desc->bEndpointAddress;
if ((wIndex ^ bEndpointAddress) & USB_DIR_IN)
continue;