]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
media: fsl-viu: set device_caps in struct video_device
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 26 Jun 2019 07:12:55 +0000 (03:12 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 22 Jul 2019 18:48:39 +0000 (14:48 -0400)
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: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/fsl-viu.c

index 691be788e38b36574e5af88a71a711d6f53b092a..bf5392f0d61cf4bc289918edeed760ea8fa63c67 100644 (file)
@@ -563,11 +563,6 @@ static int vidioc_querycap(struct file *file, void *priv,
        strscpy(cap->driver, "viu", sizeof(cap->driver));
        strscpy(cap->card, "viu", sizeof(cap->card));
        strscpy(cap->bus_info, "platform:viu", sizeof(cap->bus_info));
-       cap->device_caps =      V4L2_CAP_VIDEO_CAPTURE |
-                               V4L2_CAP_STREAMING     |
-                               V4L2_CAP_VIDEO_OVERLAY |
-                               V4L2_CAP_READWRITE;
-       cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
        return 0;
 }
 
@@ -1380,6 +1375,8 @@ static const struct video_device viu_template = {
        .release        = video_device_release,
 
        .tvnorms        = V4L2_STD_NTSC_M | V4L2_STD_PAL,
+       .device_caps    = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
+                         V4L2_CAP_VIDEO_OVERLAY | V4L2_CAP_READWRITE,
 };
 
 static int viu_of_probe(struct platform_device *op)