1 diff -rupN NVIDIA-Linux-x86_64-331.38.orig/kernel/nv-acpi.c NVIDIA-Linux-x86_64-331.38/kernel/nv-acpi.c
2 --- NVIDIA-Linux-x86_64-331.38.orig/kernel/nv-acpi.c 2014-01-25 09:39:47.126966926 +0100
3 +++ NVIDIA-Linux-x86_64-331.38/kernel/nv-acpi.c 2014-01-26 09:59:45.853427603 +0100
4 @@ -303,7 +303,10 @@ static int nv_acpi_remove(struct acpi_de
6 if (pNvAcpiObject->notify_handler_installed)
8 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
9 + /* beginning with 3.13, acpi_remove_notify_handler() waits for events to finish */
10 NV_ACPI_OS_WAIT_EVENTS_COMPLETE();
13 // remove event notifier
14 status = acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, nv_acpi_event);
15 @@ -1076,10 +1079,17 @@ RM_STATUS NV_API_CALL nv_acpi_dsm_method
16 union acpi_object dsm_params[4];
17 NvU8 argument3[4]; /* For all DSM sub functions, input size is 4 */
18 acpi_handle dev_handle = NULL;
19 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
20 #ifdef DEVICE_ACPI_HANDLE
21 nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
22 dev_handle = DEVICE_ACPI_HANDLE(&nvl->dev->dev);
26 + nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
27 + dev_handle = ACPI_HANDLE(&nvl->dev->dev);
31 return RM_ERR_NOT_SUPPORTED;
33 @@ -1179,12 +1189,21 @@ RM_STATUS NV_API_CALL nv_acpi_ddc_method
35 acpi_handle dev_handle = NULL;
36 acpi_handle lcd_dev_handle = NULL;
37 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
38 #ifdef DEVICE_ACPI_HANDLE
39 nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
40 dev_handle = DEVICE_ACPI_HANDLE(&nvl->dev->dev);
42 return RM_ERR_NOT_SUPPORTED;
46 + nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
47 + dev_handle = ACPI_HANDLE(&nvl->dev->dev);
49 + return RM_ERR_NOT_SUPPORTED;
53 return RM_ERR_INVALID_ARGUMENT;
55 @@ -1294,12 +1313,21 @@ RM_STATUS NV_API_CALL nv_acpi_rom_method
56 union acpi_object rom_arg[2];
57 struct acpi_object_list input = { 2, rom_arg };
58 acpi_handle dev_handle = NULL;
59 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
60 #ifdef DEVICE_ACPI_HANDLE
61 nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
62 dev_handle = DEVICE_ACPI_HANDLE(&nvl->dev->dev);
64 return RM_ERR_NOT_SUPPORTED;
68 + nv_linux_state_t *nvl = NV_GET_NVL_FROM_NV_STATE(nv);
69 + dev_handle = ACPI_HANDLE(&nvl->dev->dev);
71 + return RM_ERR_NOT_SUPPORTED;
75 return RM_ERR_INVALID_ARGUMENT;