]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: cx231xx: set device_caps for 417
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 24 Feb 2025 13:13:24 +0000 (14:13 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 5 Mar 2025 09:43:24 +0000 (10:43 +0100)
The video_device for the MPEG encoder did not set device_caps.

Add this, otherwise the video device can't be registered (you get a
WARN_ON instead).

Not seen before since currently 417 support is disabled, but I found
this while experimenting with it.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/cx231xx/cx231xx-417.c

index a4a9781328c50a47a3bda1894a4c71ed2cca3dea..06d61e52f018c521ad806f0290fa8a1c1396ead3 100644 (file)
@@ -1720,6 +1720,8 @@ static void cx231xx_video_dev_init(
        vfd->lock = &dev->lock;
        vfd->release = video_device_release_empty;
        vfd->ctrl_handler = &dev->mpeg_ctrl_handler.hdl;
+       vfd->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING |
+                          V4L2_CAP_VIDEO_CAPTURE;
        video_set_drvdata(vfd, dev);
        if (dev->tuner_type == TUNER_ABSENT) {
                v4l2_disable_ioctl(vfd, VIDIOC_G_FREQUENCY);