---- 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 @@
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);
.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,
}
-#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)
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
}