staging/most/video: set device_caps in struct video_device
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 26 Jun 2019 08:30:17 +0000 (10:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jul 2019 06:48:41 +0000 (08:48 +0200)
Instead of filling in the struct v4l2_capability device_caps
field, fill in the struct video_device device_caps field.

That way the V4L2 core knows what the capabilities of the
video device are.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/video/video.c

index 19ae7c4873b4435d2f3e70447779d776f70f32ce..6f6e98ab0550073132edd745d1313552c844c309 100644 (file)
@@ -250,11 +250,6 @@ static int vidioc_querycap(struct file *file, void *priv,
        strlcpy(cap->card, "MOST", sizeof(cap->card));
        snprintf(cap->bus_info, sizeof(cap->bus_info),
                 "%s", mdev->iface->description);
-
-       cap->capabilities =
-               V4L2_CAP_READWRITE |
-               V4L2_CAP_TUNER |
-               V4L2_CAP_VIDEO_CAPTURE;
        return 0;
 }
 
@@ -366,6 +361,7 @@ static const struct video_device comp_videodev_template = {
        .release = video_device_release,
        .ioctl_ops = &video_ioctl_ops,
        .tvnorms = V4L2_STD_UNKNOWN,
+       .device_caps = V4L2_CAP_READWRITE | V4L2_CAP_VIDEO_CAPTURE,
 };
 
 /**************************************************************************/