1
diff --git a/nv-acpi.c b/nv-acpi.c
2
index b0138cd..1ee05bd 100644
5
@@ -48,6 +48,12 @@ static const struct acpi_device_id nv_video_device_ids[] = {
9
+#ifndef DEVICE_ACPI_HANDLE
11
+#define DEVICE_ACPI_HANDLE ACPI_HANDLE
15
static struct acpi_driver *nv_acpi_driver;
16
static acpi_handle nvif_handle = NULL;
17
static acpi_handle nvif_parent_gpu_handle = NULL;
18
@@ -303,7 +309,9 @@ static int nv_acpi_remove(struct acpi_device *device, int type)
20
if (pNvAcpiObject->notify_handler_installed)
22
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
23
NV_ACPI_OS_WAIT_EVENTS_COMPLETE();
26
// remove event notifier
27
status = acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, nv_acpi_event);
28
diff --git a/nv-linux.h b/nv-linux.h
29
index 8d5d04b..7825518 100644
32
@@ -267,7 +267,11 @@ extern int nv_pat_mode;
34
#if !defined(NV_VMWARE) && defined(CONFIG_ACPI)
35
#include <acpi/acpi.h>
36
+#include <linux/acpi.h>
37
#include <acpi/acpi_drivers.h>
38
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
39
+#include <acpi/acpi_bus.h>
41
#if defined(NV_ACPI_DEVICE_OPS_HAS_MATCH) || defined(ACPI_VIDEO_HID)
42
#define NV_LINUX_ACPI_EVENTS_SUPPORTED 1