From 82626d4892eeb9eb704538bf0dc49a00725ff451 Mon Sep 17 00:00:00 2001 From: Isaac Date: Thu, 16 Apr 2020 14:57:47 +0800 Subject: [PATCH] Rename V4L2_TYPE_GRABBER to V4L2_TYPE_VIDEO for 5.7rc1 Fixes builds on 5.7rc1; credit to: https://github.com/umlaeute/v4l2loopback/commit/4815caf32e5dceb0a0cad02d9522d0a44d1defd6 --- fthd_v4l2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fthd_v4l2.c b/fthd_v4l2.c index ae143bf..156d139 100644 --- a/fthd_v4l2.c +++ b/fthd_v4l2.c @@ -41,6 +41,10 @@ #define FTHD_MIN_HEIGHT 240 #define FTHD_NUM_FORMATS 2 /* NV16 is disabled for now */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 7, 0) +# define VFL_TYPE_VIDEO VFL_TYPE_GRABBER +#endif + static int fthd_buffer_queue_setup( struct vb2_queue *vq, #if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0) @@ -729,7 +733,7 @@ int fthd_v4l2_register(struct fthd_private *dev_priv) V4L2_CAP_STREAMING; #endif video_set_drvdata(vdev, dev_priv); - ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1); + ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1); if (ret) { video_device_release(vdev); goto fail_vdev;