From: Jan Rękorajski Date: Fri, 12 May 2017 19:35:48 +0000 (+0200) Subject: - fix patch for 4.11 X-Git-Tag: auto/th/xorg-driver-video-nvidia-legacy-304xx-304.135-3 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fxorg-driver-video-nvidia-legacy-304xx.git;a=commitdiff_plain;h=3f5f212 - fix patch for 4.11 - rel 3 --- 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( 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