[media] saa7164: fix querycap warning
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 27 Mar 2015 18:17:56 +0000 (15:17 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 1 May 2015 10:23:51 +0000 (07:23 -0300)
Fix the VIDIOC_QUERYCAP warning due to the missing device_caps. Don't fill
in the version field, the V4L2 core will do that for you.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: <stable@vger.kernel.org> # for v3.19 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/saa7164/saa7164-encoder.c
drivers/media/pci/saa7164/saa7164-vbi.c

index 1ceed0cdced06dec0a7d0984f67bd049a2859471..4434e0f28c26f34120a82ea080cf00fa84100d9c 100644 (file)
@@ -721,13 +721,14 @@ static int vidioc_querycap(struct file *file, void  *priv,
                sizeof(cap->card));
        sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci));
 
-       cap->capabilities =
+       cap->device_caps =
                V4L2_CAP_VIDEO_CAPTURE |
-               V4L2_CAP_READWRITE     |
-               0;
+               V4L2_CAP_READWRITE |
+               V4L2_CAP_TUNER;
 
-       cap->capabilities |= V4L2_CAP_TUNER;
-       cap->version = 0;
+       cap->capabilities = cap->device_caps |
+               V4L2_CAP_VBI_CAPTURE |
+               V4L2_CAP_DEVICE_CAPS;
 
        return 0;
 }
index 56b33fd65328f123c5ed7d1dbcbba2b3c3a08792..859fd03d82f93f4c0c5893f4b541cd665ac0b65a 100644 (file)
@@ -660,13 +660,14 @@ static int vidioc_querycap(struct file *file, void  *priv,
                sizeof(cap->card));
        sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci));
 
-       cap->capabilities =
+       cap->device_caps =
                V4L2_CAP_VBI_CAPTURE |
-               V4L2_CAP_READWRITE     |
-               0;
+               V4L2_CAP_READWRITE |
+               V4L2_CAP_TUNER;
 
-       cap->capabilities |= V4L2_CAP_TUNER;
-       cap->version = 0;
+       cap->capabilities = cap->device_caps |
+               V4L2_CAP_VIDEO_CAPTURE |
+               V4L2_CAP_DEVICE_CAPS;
 
        return 0;
 }