Skip to content

Commit e9bffaa

Browse files
committed
usb: gadget: f_uvc: not handle alt 0 for bulk streaming intf
Because alt settings in an interface are supported only for ISOC endpoints, so do not handle alt 0 for bulk streaming interface. Change-Id: Iadcf6c058023d5a3d6caa353cd783752f84a77a9 Signed-off-by: William Wu <william.wu@rock-chips.com>
1 parent 9dfd0e5 commit e9bffaa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/usb/gadget/function/f_uvc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,11 @@ uvc_function_set_alt(struct usb_function *f, unsigned interface, unsigned alt)
463463
return 0;
464464

465465
case UVC_STATE_STREAMING:
466+
if (!alt) {
467+
uvcg_info(f, "bulk streaming intf not support alt 0\n");
468+
return 0;
469+
}
470+
466471
if (uvc->video.ep &&
467472
uvc->video.ep->enabled) {
468473
ret = usb_ep_disable(uvc->video.ep);

0 commit comments

Comments
 (0)