aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_uvc.c
diff options
context:
space:
mode:
authorTatyana Brokhman <tlinder@codeaurora.org>2011-06-28 09:33:48 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-28 14:14:36 -0400
commit72c973dd2b01b212a159faa330a2bc641a3ed809 (patch)
tree2fbc36b4103678cd9b7599deaab06f89e4871de2 /drivers/usb/gadget/f_uvc.c
parent0f91349b89f37dfad7b77f7829a105b6a0f526ec (diff)
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_uvc.c')
-rw-r--r--drivers/usb/gadget/f_uvc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c
index be446b7e7eaa..df74d0311910 100644
--- a/drivers/usb/gadget/f_uvc.c
+++ b/drivers/usb/gadget/f_uvc.c
@@ -262,8 +262,10 @@ uvc_function_set_alt(struct usb_function *f, unsigned interface, unsigned alt)
262 if (uvc->state != UVC_STATE_CONNECTED) 262 if (uvc->state != UVC_STATE_CONNECTED)
263 return 0; 263 return 0;
264 264
265 if (uvc->video.ep) 265 if (uvc->video.ep) {
266 usb_ep_enable(uvc->video.ep, &uvc_streaming_ep); 266 uvc->video.ep->desc = &uvc_streaming_ep;
267 usb_ep_enable(uvc->video.ep);
268 }
267 269
268 memset(&v4l2_event, 0, sizeof(v4l2_event)); 270 memset(&v4l2_event, 0, sizeof(v4l2_event));
269 v4l2_event.type = UVC_EVENT_STREAMON; 271 v4l2_event.type = UVC_EVENT_STREAMON;