From: Hans Verkuil Date: Tue, 17 Feb 2015 08:44:08 +0000 (-0300) Subject: [media] uvc gadget: set device_caps in querycap X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=06e5cc3d0d70a278baa7b9e1f466cd94b4a4285b;p=linux-beck.git [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 Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/usb/gadget/function/uvc_v4l2.c b/drivers/usb/gadget/function/uvc_v4l2.c index 5a84e51675d1..cbd9bf020fb3 100644 --- a/drivers/usb/gadget/function/uvc_v4l2.c +++ b/drivers/usb/gadget/function/uvc_v4l2.c @@ -75,7 +75,8 @@ uvc_v4l2_querycap(struct file *file, void *fh, struct v4l2_capability *cap) strlcpy(cap->bus_info, dev_name(&cdev->gadget->dev), sizeof(cap->bus_info)); - cap->capabilities = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; + cap->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; + cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; return 0; }