diff -Nur kernel/nvidia/nv-acpi.c kernel.new/nvidia/nv-acpi.c --- kernel/nvidia/nv-acpi.c 2026-10-15 17:29:59.473239224 -0400 +++ kernel.new/nvidia/nv-acpi.c 2026-10-15 17:51:03.427673454 -0400 @@ -21,6 +21,9 @@ static NV_STATUS nv_acpi_extract_buffer (const union acpi_object *, void *, NvU32, NvU32 *); static NV_STATUS nv_acpi_extract_package (const union acpi_object *, void *, NvU32, NvU32 *); static NV_STATUS nv_acpi_extract_object (const union acpi_object *, void *, NvU32, NvU32 *); + +// Rel. commit "ACPI: bus: Eliminate struct acpi_driver" (Rafael J. Wysocki, 1 Jul 2026) +#if LINUX_VERSION_CODE < KERNEL_VERSION(7, 3, 0) static int nv_acpi_add (struct acpi_device *); @@ -34,6 +37,7 @@ #endif static void nv_acpi_event (acpi_handle, u32, void *); +#endif static acpi_status nv_acpi_find_methods (acpi_handle, u32, void *, void **); static NV_STATUS nv_acpi_nvif_method (NvU32, NvU32, void *, NvU16, NvU32 *, void *, NvU16 *); @@ -41,6 +45,8 @@ static NV_STATUS nv_acpi_mxmi_method (NvU8 *, NvU16 *); static NV_STATUS nv_acpi_mxms_method (NvU8 *, NvU16 *); +// Rel. commit "ACPI: bus: Eliminate struct acpi_driver" (Rafael J. Wysocki, 1 Jul 2026) +#if LINUX_VERSION_CODE < KERNEL_VERSION(7, 3, 0) #if defined(NV_ACPI_DEVICE_OPS_HAS_MATCH) static int nv_acpi_match (struct acpi_device *, struct acpi_driver *); #endif @@ -59,12 +65,16 @@ #endif static struct acpi_driver *nv_acpi_driver; +#endif static acpi_handle nvif_handle = NULL; static acpi_handle nvif_parent_gpu_handle = NULL; static acpi_handle wmmx_handle = NULL; static acpi_handle mxmi_handle = NULL; static acpi_handle mxms_handle = NULL; +#if LINUX_VERSION_CODE < KERNEL_VERSION(7, 3, 0) +// Rel. commit "ACPI: bus: Eliminate struct acpi_driver" (Rafael J. Wysocki, 1 Jul 2026) + static const struct acpi_driver nv_acpi_driver_template = { .name = "NVIDIA ACPI Video Driver", .class = "video", @@ -90,6 +100,7 @@ #endif }, }; +#endif static int nv_acpi_get_device_handle(nv_state_t *nv, acpi_handle *dev_handle) { @@ -136,6 +147,7 @@ }; #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(7, 3, 0) int nv_acpi_init(void) { /* @@ -487,6 +499,23 @@ // unsubscribe. } +#else +// Rel. commit "ACPI: bus: Eliminate struct acpi_driver" (Rafael J. Wysocki, 1 Jul 2026) +// The old API (struct acpi_driver, acpi_bus_register_driver, etc.) is removed +// and the replacement (struct platform_driver, platform_driver_register) is +// GPL-only, so remove this; It only impacts laptop hotkey handling rather than +// any critical function of the driver. +int nv_acpi_init(void) +{ + return 0; +} + +int nv_acpi_uninit(void) +{ + return 0; +} +#endif + #if defined(NV_ACPI_DEVICE_OPS_HAS_MATCH) static int nv_acpi_match(struct acpi_device *device, struct acpi_driver *driver) {