summaryrefslogtreecommitdiff
path: root/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-304.137-kernel-4.14.patch
blob: 7452308003d1aa7b75326cc517f520fa6c6e6209 (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
diff -Nur a/kernel/nv-drm.c b/kernel/nv-drm.c
--- a/kernel/nv-drm.c	2017-09-14 21:51:09.000000000 +0100
+++ b/kernel/nv-drm.c	2017-12-22 15:29:01.080842070 +0000
@@ -121,8 +121,12 @@
 {
     int ret = 0;
 #if defined(NV_DRM_AVAILABLE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+    ret = drm_legacy_pci_init(&nv_drm_driver, pci_driver);
+#else
     ret = drm_pci_init(&nv_drm_driver, pci_driver);
 #endif
+#endif
     return ret;
 }
 
@@ -131,6 +135,10 @@
 )
 {
 #if defined(NV_DRM_AVAILABLE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+    drm_legacy_pci_exit(&nv_drm_driver, pci_driver);
+#else
     drm_pci_exit(&nv_drm_driver, pci_driver);
 #endif
+#endif
 }