facetimehd: set device_caps in video_device

In kernel 5.4 I otherwise get this warning

WARNING: CPU: 1 PID: 451 at drivers/media/v4l2-core/v4l2-dev.c:863 __video_register_device+0x64b/0xe90 [videodev]
The code there is:

        /* the device_caps field MUST be set for all but subdevs */
        if (WARN_ON(type != VFL_TYPE_SUBDEV && !vdev->device_caps))

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
This commit is contained in:
Andreas Kemnade
2019-11-25 13:17:00 +01:00
committed by Patrik Jakobsson
parent 7d3b650382
commit f0c2f05272

View File

@@ -730,6 +730,10 @@ int fthd_v4l2_register(struct fthd_private *dev_priv)
vdev->queue = q;
vdev->release = video_device_release;
vdev->ctrl_handler = &dev_priv->v4l2_ctrl_handler;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,4,0)
vdev->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
V4L2_CAP_STREAMING;
#endif
video_set_drvdata(vdev, dev_priv);
ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
if (ret) {