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-ci...@xs4all.nl>
Cc: Jonathan Corbet <cor...@lwn.net>
---
 drivers/media/platform/marvell-ccic/mcam-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c 
b/drivers/media/platform/marvell-ccic/mcam-core.c
index dc30c48d4671..69862c44e409 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -1357,9 +1357,6 @@ static int mcam_vidioc_querycap(struct file *file, void 
*priv,
        strscpy(cap->driver, "marvell_ccic", sizeof(cap->driver));
        strscpy(cap->card, "marvell_ccic", sizeof(cap->card));
        strscpy(cap->bus_info, cam->bus_info, sizeof(cap->bus_info));
-       cap->device_caps = V4L2_CAP_VIDEO_CAPTURE |
-               V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
-       cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
        return 0;
 }
 
@@ -1698,6 +1695,8 @@ static const struct video_device mcam_v4l_template = {
        .fops = &mcam_v4l_fops,
        .ioctl_ops = &mcam_v4l_ioctl_ops,
        .release = video_device_release_empty,
+       .device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
+                      V4L2_CAP_STREAMING,
 };
 
 /* ---------------------------------------------------------------------- */
-- 
2.20.1

Reply via email to