Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] uvc gadget: set device_caps in querycap

The V4L2 core will warn if this is not done. Unfortunately this driver
wasn't updated.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
06e5cc3d 9945eb9f

+2 -1
+2 -1
drivers/usb/gadget/function/uvc_v4l2.c
··· 75 75 strlcpy(cap->bus_info, dev_name(&cdev->gadget->dev), 76 76 sizeof(cap->bus_info)); 77 77 78 - cap->capabilities = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; 78 + cap->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; 79 + cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; 79 80 80 81 return 0; 81 82 }