[packages/xorg-driver-video-nvidia-legacy-304xx] - fix patch for 4.11 - rel 3

baggins baggins at pld-linux.org
Fri May 12 21:36:05 CEST 2017


commit 3f5f21231ecd5881d20ea1e4c736717dac89f8d6
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri May 12 21:35:48 2017 +0200

    - fix patch for 4.11
    - rel 3

 linux-4.11.patch                           | 29 +++++++++++++++++++----------
 xorg-driver-video-nvidia-legacy-304xx.spec |  2 +-
 2 files changed, 20 insertions(+), 11 deletions(-)
---
diff --git a/xorg-driver-video-nvidia-legacy-304xx.spec b/xorg-driver-video-nvidia-legacy-304xx.spec
index b038336..2d9ee30 100644
--- a/xorg-driver-video-nvidia-legacy-304xx.spec
+++ b/xorg-driver-video-nvidia-legacy-304xx.spec
@@ -25,7 +25,7 @@ exit 1
 
 %define		no_install_post_check_so 1
 
-%define		rel	2
+%define		rel	3
 %define		mname	nvidia-legacy-304xx
 %define		pname	xorg-driver-video-%{mname}
 Summary:	Linux Drivers for nVidia GeForce/Quadro Chips
diff --git a/linux-4.11.patch b/linux-4.11.patch
index 04eb7f1..6094fc9 100644
--- a/linux-4.11.patch
+++ b/linux-4.11.patch
@@ -13,7 +13,7 @@
 
          #else
 
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
                 return get_user_pages_remote(tsk, mm, start, nr_pages, flags,
                                              pages, vmas);
 +#else
@@ -29,7 +29,7 @@
  }
 
  #if defined(NV_ENABLE_PAT_SUPPORT) && defined(NV_ENABLE_HOTPLUG_CPU)
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
  static int
  nvidia_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
  {
@@ -72,7 +72,7 @@
  #if defined(NV_ENABLE_PAT_SUPPORT) && defined(NV_ENABLE_HOTPLUG_CPU)
          if (nv_pat_mode == NV_PAT_MODE_BUILTIN)
          {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
              if (register_hotcpu_notifier(&nv_hotcpu_nfb) != 0)
 +#else
 +            if (cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
@@ -87,7 +87,7 @@
      {
          nv_disable_pat_support();
  #if defined(NV_ENABLE_PAT_SUPPORT) && defined(NV_ENABLE_HOTPLUG_CPU)
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
          unregister_hotcpu_notifier(&nv_hotcpu_nfb);
 +#else
 +        cpuhp_remove_state_nocalls(CPUHP_AP_ONLINE_DYN);
@@ -97,30 +97,39 @@
  }
 --- kernel/nv-drm.c	2017-03-31 03:42:21.000000000 +0200
 +++ kernel/nv-drm.c	2017-04-06 23:53:14.273356795 +0200
-@@ -48,7 +48,7 @@
+@@ -48,7 +48,11 @@
      return -ENODEV;
  }
 
--static int nv_drm_unload(
++#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
  )
  {
-@@ -60,7 +60,7 @@
+@@ -60,7 +60,11 @@
      {
          if (nvl->dev == dev->pdev)
          {
--            return 0;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+             return 0;
++else
 +            return;
++#endif
          }
      }
  
-@@ -64,7 +64,7 @@
+@@ -64,7 +64,11 @@
          }
      }
 
--    return -ENODEV;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+     return -ENODEV;
++else
 +    return;
++#endif
  }
 
  static void nv_gem_free(
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia-legacy-304xx.git/commitdiff/3f5f21231ecd5881d20ea1e4c736717dac89f8d6



More information about the pld-cvs-commit mailing list