diff options
Diffstat (limited to 'drivers/usb/gadget/f_uvc.c')
-rw-r--r-- | drivers/usb/gadget/f_uvc.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c index 49939e44ed74..38dcedddc52c 100644 --- a/drivers/usb/gadget/f_uvc.c +++ b/drivers/usb/gadget/f_uvc.c | |||
@@ -266,6 +266,13 @@ uvc_function_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl) | |||
266 | return 0; | 266 | return 0; |
267 | } | 267 | } |
268 | 268 | ||
269 | void uvc_function_setup_continue(struct uvc_device *uvc) | ||
270 | { | ||
271 | struct usb_composite_dev *cdev = uvc->func.config->cdev; | ||
272 | |||
273 | usb_composite_setup_continue(cdev); | ||
274 | } | ||
275 | |||
269 | static int | 276 | static int |
270 | uvc_function_get_alt(struct usb_function *f, unsigned interface) | 277 | uvc_function_get_alt(struct usb_function *f, unsigned interface) |
271 | { | 278 | { |
@@ -328,7 +335,7 @@ uvc_function_set_alt(struct usb_function *f, unsigned interface, unsigned alt) | |||
328 | v4l2_event_queue(uvc->vdev, &v4l2_event); | 335 | v4l2_event_queue(uvc->vdev, &v4l2_event); |
329 | 336 | ||
330 | uvc->state = UVC_STATE_CONNECTED; | 337 | uvc->state = UVC_STATE_CONNECTED; |
331 | break; | 338 | return 0; |
332 | 339 | ||
333 | case 1: | 340 | case 1: |
334 | if (uvc->state != UVC_STATE_CONNECTED) | 341 | if (uvc->state != UVC_STATE_CONNECTED) |
@@ -345,15 +352,11 @@ uvc_function_set_alt(struct usb_function *f, unsigned interface, unsigned alt) | |||
345 | memset(&v4l2_event, 0, sizeof(v4l2_event)); | 352 | memset(&v4l2_event, 0, sizeof(v4l2_event)); |
346 | v4l2_event.type = UVC_EVENT_STREAMON; | 353 | v4l2_event.type = UVC_EVENT_STREAMON; |
347 | v4l2_event_queue(uvc->vdev, &v4l2_event); | 354 | v4l2_event_queue(uvc->vdev, &v4l2_event); |
348 | 355 | return USB_GADGET_DELAYED_STATUS; | |
349 | uvc->state = UVC_STATE_STREAMING; | ||
350 | break; | ||
351 | 356 | ||
352 | default: | 357 | default: |
353 | return -EINVAL; | 358 | return -EINVAL; |
354 | } | 359 | } |
355 | |||
356 | return 0; | ||
357 | } | 360 | } |
358 | 361 | ||
359 | static void | 362 | static void |