summaryrefslogtreecommitdiff
path: root/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-304.137-kernel-4.14.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-304.137-kernel-4.14.patch')
-rw-r--r--sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-304.137-kernel-4.14.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-304.137-kernel-4.14.patch b/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-304.137-kernel-4.14.patch
new file mode 100644
index 00000000..74523080
--- /dev/null
+++ b/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-dkms-304.137-kernel-4.14.patch
@@ -0,0 +1,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
+ }