8000 Remove support for pre-4.0.0 kernels. · v4l2loopback/v4l2loopback@dc5bd0f · GitHub
[go: up one dir, main page]

Skip to content

Commit dc5bd0f

Browse files
committed
Remove support for pre-4.0.0 kernels.
Signed-off-by: Wren Turkal <wt@penguintechs.org>
1 parent 87b1f14 commit dc5bd0f

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

v4l2loopback.c

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
#include <linux/miscdevice.h>
3434
#include "v4l2loopback.h"
3535

36-
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 1)
37-
#error This module is not supported on kernels before 3.6.1.
36+
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
37+
#error This module is not supported on kernels before 4.0.0.
3838
#endif
3939

4040
#if defined(timer_setup) && defined(from_timer)
@@ -91,14 +91,8 @@ MODULE_LICENSE("GPL");
9191

9292
static inline void v4l2l_get_timestamp(struct v4l2_buffer *b)
9393
{
94-
/* ktime_get_ts is considered deprecated, so use ktime_get_ts64 if possible */
95-
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
96-
struct timespec ts;
97-
ktime_get_ts(&ts);
98-
#else
9994
struct timespec64 ts;
10095
ktime_get_ts64(&ts);
101-
#endif
10296

10397
b->timestamp.tv_sec = ts.tv_sec;
10498
b->timestamp.tv_usec = (ts.tv_nsec / NSEC_PER_USEC);
@@ -2171,18 +2165,10 @@ static void init_vdev(struct video_device *vdev, int nr)
21712165
#endif /* >=linux-4.7.0 */
21722166

21732167
if (debug > 1)
2174-
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
2175-
vdev->debug = V4L2_DEBUG_IOCTL | V4L2_DEBUG_IOCTL_ARG;
2176-
#else
21772168
vdev->dev_debug =
21782169
V4L2_DEV_DEBUG_IOCTL | V4L2_DEV_DEBUG_IOCTL_ARG;
2179-
#endif
21802170

2181-
/* since kernel-3.7, there is a new field 'vfl_dir' that has to be
2182-
* set to VFL_DIR_M2M for bidirectional devices */
2183-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
21842171
vdev->vfl_dir = VFL_DIR_M2M;
2185-
#endif
21862172

21872173
MARK();
21882174
}

0 commit comments

Comments
 (0)
0