[media] vivi: don't set V4L2_CAP_DEVICE_CAPS for the device_caps field
authorHans Verkuil <hverkuil@xs4all.nl>
Tue, 24 Jan 2012 08:24:36 +0000 (05:24 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 26 Jan 2012 17:35:54 +0000 (15:35 -0200)
V4L2_CAP_DEVICE_CAPS is valid for the capabilities field only as per
the spec.

Found with v4l2-compliance.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/vivi.c

index 84ea88dc10ada0f1a60ae816ae13b73ab83ca965..5578c195358514e1c012fe2c04d188986a059885 100644 (file)
@@ -819,9 +819,9 @@ static int vidioc_querycap(struct file *file, void  *priv,
        strcpy(cap->driver, "vivi");
        strcpy(cap->card, "vivi");
        strlcpy(cap->bus_info, dev->v4l2_dev.name, sizeof(cap->bus_info));
-       cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
-                           V4L2_CAP_READWRITE | V4L2_CAP_DEVICE_CAPS;
-       cap->device_caps = cap->capabilities;
+       cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
+                           V4L2_CAP_READWRITE;
+       cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
        return 0;
 }