summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_eem.c
diff options
context:
space:
mode:
authorTatyana Brokhman <tlinder@codeaurora.org>2011-06-28 15:33:48 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-28 20:14:36 +0200
commit72c973dd2b01b212a159faa330a2bc641a3ed809 (patch)
tree2fbc36b4103678cd9b7599deaab06f89e4871de2 /drivers/usb/gadget/f_eem.c
parentusb: gadget: convert all users to the new udc infrastructure (diff)
downloadlinux-72c973dd2b01b212a159faa330a2bc641a3ed809.tar.xz
linux-72c973dd2b01b212a159faa330a2bc641a3ed809.zip
usb: gadget: add usb_endpoint_descriptor to struct usb_ep
Change usb_ep_enable() prototype to use endpoint descriptor from usb_ep. This optimization spares the FDs from saving the endpoint chosen descriptor. This optimization is not full though. To fully exploit this change, one needs to update all the UDCs as well since in the current implementation each of them saves the endpoint descriptor in it's internal (and extended) endpoint structure. Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/f_eem.c')
-rw-r--r--drivers/usb/gadget/f_eem.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c
index b3c304290150..fea8e3b08b5f 100644
--- a/drivers/usb/gadget/f_eem.c
+++ b/drivers/usb/gadget/f_eem.c
@@ -176,11 +176,11 @@ static int eem_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
gether_disconnect(&eem->port);
}
- if (!eem->port.in) {
+ if (!eem->port.in_ep->desc) {
DBG(cdev, "init eem\n");
- eem->port.in = ep_choose(cdev->gadget,
+ eem->port.in_ep->desc = ep_choose(cdev->gadget,
eem->hs.in, eem->fs.in);
- eem->port.out = ep_choose(cdev->gadget,
+ eem->port.out_ep->desc = ep_choose(cdev->gadget,
eem->hs.out, eem->fs.out);
}
@@ -289,9 +289,9 @@ fail:
usb_free_descriptors(f->descriptors);
/* we might as well release our claims on endpoints */
- if (eem->port.out)
+ if (eem->port.out_ep->desc)
eem->port.out_ep->driver_data = NULL;
- if (eem->port.in)
+ if (eem->port.in_ep->desc)
eem->port.in_ep->driver_data = NULL;
ERROR(cdev, "%s: can't bind, err %d\n", f->name, status);