OSDN Git Service

[media] uvc gadget: set device_caps in querycap
authorHans Verkuil <hans.verkuil@cisco.com>
Tue, 17 Feb 2015 08:44:08 +0000 (05:44 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
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 <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/usb/gadget/function/uvc_v4l2.c

index 5a84e51..cbd9bf0 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;
 }