|
33 | 33 | #include <linux/miscdevice.h>
|
34 | 34 | #include "v4l2loopback.h"
|
35 | 35 |
|
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. |
38 | 38 | #endif
|
39 | 39 |
|
40 | 40 | #if defined(timer_setup) && defined(from_timer)
|
@@ -91,14 +91,8 @@ MODULE_LICENSE("GPL");
|
91 | 91 |
|
92 | 92 | static inline void v4l2l_get_timestamp(struct v4l2_buffer *b)
|
93 | 93 | {
|
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 |
99 | 94 | struct timespec64 ts;
|
100 | 95 | ktime_get_ts64(&ts);
|
101 |
| -#endif |
102 | 96 |
|
103 | 97 | b->timestamp.tv_sec = ts.tv_sec;
|
104 | 98 | b->timestamp.tv_usec = (ts.tv_nsec / NSEC_PER_USEC);
|
@@ -2171,18 +2165,10 @@ static void init_vdev(struct video_device *vdev, int nr)
|
2171 | 2165 | #endif /* >=linux-4.7.0 */
|
2172 | 2166 |
|
2173 | 2167 | 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 |
2177 | 2168 | vdev->dev_debug =
|
2178 | 2169 | V4L2_DEV_DEBUG_IOCTL | V4L2_DEV_DEBUG_IOCTL_ARG;
|
2179 |
| -#endif |
2180 | 2170 |
|
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) |
2184 | 2171 | vdev->vfl_dir = VFL_DIR_M2M;
|
2185 |
| -#endif |
2186 | 2172 |
|
2187 | 2173 | MARK();
|
2188 | 2174 | }
|
|
0 commit comments