mirror of
https://github.com/patjak/facetimehd.git
synced 2026-04-09 11:02:31 +02:00
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:
committed by
Patrik Jakobsson
parent
7d3b650382
commit
f0c2f05272
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user