blob: 71e32628041ea3573048fbf2647f802649860f11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
--- a/kernel/nv-drm.c
+++ b/kernel/nv-drm.c
@@ -22,6 +22,8 @@
#include <drm/drm_gem.h>
#endif
+#include <linux/version.h>
+
extern nv_linux_state_t *nv_linux_devices;
static int nv_drm_load(
@@ -42,7 +44,11 @@
return -ENODEV;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
static int nv_drm_unload(
+#else
+static void nv_drm_unload(
+#endif
struct drm_device *dev
)
{
@@ -52,11 +58,19 @@
{
if (nvl->dev == dev->pdev)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
return 0;
+#else
+ return;
+#endif
}
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
return -ENODEV;
+#else
+ return;
+#endif
}
static const struct file_operations nv_drm_fops = {
|