~ubuntu-branches/ubuntu/utopic/nvidia-graphics-drivers-331-updates/utopic-updates

« back to all changes in this revision

Viewing changes to debian/dkms_nvidia/patches/buildfix_kernel_3.14.patch

  • Committer: Package Import Robot
  • Author(s): Alberto Milone, Tim O'Shea
  • Date: 2014-04-03 17:20:34 UTC
  • Revision ID: package-import@ubuntu.com-20140403172034-89afgdyezbr22psp
Tags: 331.38-0ubuntu7
[ Tim O'Shea ]
* debian/templates/dkms_nvidia.conf.in,
  debian/dkms_nvidia/patches/buildfix_kernel_3.14.patch:
  - Add support for Linux 3.14 (LP: #1289440).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff --git a/nv-acpi.c b/nv-acpi.c
 
2
index b0138cd..1ee05bd 100644
 
3
--- a/nv-acpi.c
 
4
+++ b/nv-acpi.c
 
5
@@ -48,6 +48,12 @@ static const struct acpi_device_id nv_video_device_ids[] = {
 
6
 };
 
7
 #endif
 
8
 
 
9
+#ifndef DEVICE_ACPI_HANDLE
 
10
+#ifdef ACPI_HANDLE
 
11
+#define DEVICE_ACPI_HANDLE ACPI_HANDLE
 
12
+#endif
 
13
+#endif
 
14
+
 
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)
 
19
 
 
20
     if (pNvAcpiObject->notify_handler_installed)
 
21
     {
 
22
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
 
23
         NV_ACPI_OS_WAIT_EVENTS_COMPLETE();
 
24
+#endif
 
25
 
 
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
 
30
--- a/nv-linux.h
 
31
+++ b/nv-linux.h
 
32
@@ -267,7 +267,11 @@ extern int nv_pat_mode;
 
33
 
 
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>
 
40
+#endif
 
41
 #if defined(NV_ACPI_DEVICE_OPS_HAS_MATCH) || defined(ACPI_VIDEO_HID)
 
42
 #define NV_LINUX_ACPI_EVENTS_SUPPORTED 1
 
43
 #endif