commit 57fd00265ccc2cdfa496bb54b64337db9d26c165
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Sun Apr 23 12:07:51 2017 +0100
patch for kernel-4.11rc
4.11_kernel.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
nvidia-304xx-kmod.spec | 7 ++++++-
2 files changed, 50 insertions(+), 1 deletion(-)
---
diff --git a/4.11_kernel.patch b/4.11_kernel.patch
new file mode 100644
index 0000000..71e3262
--- /dev/null
+++ b/4.11_kernel.patch
@@ -0,0 +1,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 = {
+
diff --git a/nvidia-304xx-kmod.spec b/nvidia-304xx-kmod.spec
index e526092..d986b14 100644
--- a/nvidia-304xx-kmod.spec
+++ b/nvidia-304xx-kmod.spec
@@ -9,7 +9,7 @@
Name: nvidia-304xx-kmod
Version: 304.135
# Taken over by kmodtool
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -24,6 +24,7 @@ Source11: nvidia-304xx-kmodtool-excludekernel-filterfile
#Patch0: disable-mtrr.patch
Patch1: 4.9.0_kernel.patch
Patch2: kernel_4.10.patch
+Patch3: 4.11_kernel.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -53,6 +54,7 @@ pushd nvidiapkg-${arch}
#patch0 -p0
%patch1 -p1
%patch2 -p1
+%patch3 -p1
popd
done
@@ -86,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sun Apr 23 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 304.135-4
+- patch for kernel-4.11rc
+
* Mon Feb 20 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 304.135-3
- patch for kernel-4.10
Show replies by date