diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-08-28 23:38:58 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-11-28 13:28:13 +0100 |
commit | f887e99ae2210e23c9726b6f146938a84f6acc47 (patch) | |
tree | e8783e91573517f5085bfb4f3031454e0fe0b8de /drivers/media/usb/uvc/uvc_v4l2.c | |
parent | [media] uvcvideo: Don't fail when an unsupported format is requested (diff) | |
download | linux-f887e99ae2210e23c9726b6f146938a84f6acc47.tar.xz linux-f887e99ae2210e23c9726b6f146938a84f6acc47.zip |
[media] uvcvideo: Set device_caps in VIDIOC_QUERYCAP
Set the capabilities field to global capabilities, and the device_caps
field to the video node capabilities.
This issue was found by the v4l2-compliance tool.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/uvc/uvc_v4l2.c')
-rw-r--r-- | drivers/media/usb/uvc/uvc_v4l2.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c index 3bd93736a82a..b1aa55fb8984 100644 --- a/drivers/media/usb/uvc/uvc_v4l2.c +++ b/drivers/media/usb/uvc/uvc_v4l2.c @@ -565,12 +565,14 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) usb_make_path(stream->dev->udev, cap->bus_info, sizeof(cap->bus_info)); cap->version = LINUX_VERSION_CODE; + cap->capabilities = V4L2_CAP_DEVICE_CAPS | V4L2_CAP_STREAMING + | chain->caps; if (stream->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) - cap->capabilities = V4L2_CAP_VIDEO_CAPTURE - | V4L2_CAP_STREAMING; + cap->device_caps = V4L2_CAP_VIDEO_CAPTURE + | V4L2_CAP_STREAMING; else - cap->capabilities = V4L2_CAP_VIDEO_OUTPUT - | V4L2_CAP_STREAMING; + cap->device_caps = V4L2_CAP_VIDEO_OUTPUT + | V4L2_CAP_STREAMING; break; } |