]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
media: ti-vpe: set device_caps in struct video_device
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 26 Jun 2019 07:17:17 +0000 (03:17 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 22 Jul 2019 19:10:05 +0000 (15:10 -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>
Acked-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/ti-vpe/cal.c

index 9e86d761546b734142fbffc27a91874939cf6ab8..78cdbd671dd595447a2c3c8350997ef152aca73a 100644 (file)
@@ -913,9 +913,6 @@ static int cal_querycap(struct file *file, void *priv,
 
        snprintf(cap->bus_info, sizeof(cap->bus_info),
                 "platform:%s", ctx->v4l2_dev.name);
-       cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
-                           V4L2_CAP_READWRITE;
-       cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
        return 0;
 }
 
@@ -1419,6 +1416,8 @@ static const struct video_device cal_videodev = {
        .ioctl_ops      = &cal_ioctl_ops,
        .minor          = -1,
        .release        = video_device_release_empty,
+       .device_caps    = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
+                         V4L2_CAP_READWRITE,
 };
 
 /* -----------------------------------------------------------------