[media] uvc gadget: set device_caps in querycap
authorHans Verkuil <[email protected]>
Tue, 17 Feb 2015 08:44:08 +0000 (05:44 -0300)
committerMauro Carvalho Chehab <[email protected]>
Mon, 2 Mar 2015 20:06:19 +0000 (17:06 -0300)
The V4L2 core will warn if this is not done. Unfortunately this driver
wasn't updated.

Signed-off-by: Hans Verkuil <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/usb/gadget/function/uvc_v4l2.c

index 5a84e51675d18b5f60d4fc9e47f4c0677a2eb6f4..cbd9bf020fb3ba0804817e0873184c82557cd32f 100644 (file)
@@ -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;
 }