]> git.pld-linux.org Git - packages/xorg-driver-video-nvidia-legacy-390xx.git/commitdiff
- simplify patch auto/th/xorg-driver-video-nvidia-legacy-390xx-390.157-2
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 25 Feb 2023 20:53:21 +0000 (21:53 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 25 Feb 2023 20:53:21 +0000 (21:53 +0100)
kenrel-6.2.patch

index d10cc37f0971019a64eb00c795e16513fbb26a32..871244476c0776e4907ea43896e4cda1c50fa3f6 100644 (file)
@@ -1,30 +1,3 @@
---- NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/conftest.sh~        2022-10-11 18:00:50.000000000 +0200
-+++ NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/conftest.sh 2023-02-25 14:19:47.560962975 +0100
-@@ -847,6 +847,24 @@
-             acpi_op_remove conftest_op_remove_routine;
-+            void conftest_acpi_device_ops_remove(struct acpi_device *device) {
-+                conftest_op_remove_routine(device);
-+            }" > conftest$$.c
-+
-+            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
-+            rm -f conftest$$.c
-+
-+            if [ -f conftest$$.o ]; then
-+                rm -f conftest$$.o
-+                echo "#define NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT_VOID 1" | append_conftest "types"
-+                return
-+            fi
-+
-+            echo "$CONFTEST_PREAMBLE
-+            #include <linux/acpi.h>
-+
-+            acpi_op_remove conftest_op_remove_routine;
-+
-             int conftest_acpi_device_ops_remove(struct acpi_device *device) {
-                 return conftest_op_remove_routine(device);
-             }" > conftest$$.c
 --- NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia/nv-acpi.c.orig       2022-10-12 11:30:26.000000000 +0200
 +++ NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia/nv-acpi.c    2023-02-25 14:32:19.579118091 +0100
 @@ -23,7 +23,9 @@
@@ -32,7 +5,7 @@
  static int         nv_acpi_add             (struct acpi_device *);
  
 -#if !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
-+#if defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT_VOID)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
 +static void        nv_acpi_remove_one_arg_void(struct acpi_device *device);
 +#elif !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
  static int         nv_acpi_remove_two_args(struct acpi_device *device, int type);
@@ -43,7 +16,7 @@
      .ops = {
          .add = nv_acpi_add,
 -#if !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
-+#if defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT_VOID)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
 +        .remove = nv_acpi_remove_one_arg_void,
 +#elif !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
          .remove = nv_acpi_remove_two_args,
@@ -54,7 +27,7 @@
  }
  
 -#if !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
-+#if defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT_VOID)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
 +static void nv_acpi_remove_one_arg_void(struct acpi_device *device)
 +#elif !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT) || (NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT == 2)
  static int nv_acpi_remove_two_args(struct acpi_device *device, int type)
@@ -64,7 +37,7 @@
          device->driver_data = NULL;
      }
  
-+#if !defined(NV_ACPI_DEVICE_OPS_REMOVE_ARGUMENT_COUNT_VOID)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0)
      return status;
 +#endif
  }
This page took 0.076296 seconds and 4 git commands to generate.