summaryrefslogtreecommitdiff
path: root/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch
blob: ffd2e459f433aa956bfc1baf0b2bcf0d73a52d94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--- firegl_public.c.orig	2011-05-10 22:19:26.395914392 +0200
+++ firegl_public.c	2011-05-11 01:40:36.967379590 +0200
@@ -114,7 +114,9 @@
 #include <linux/pci.h>
 #include <linux/wait.h>
 #include <linux/miscdevice.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
 #include <linux/smp_lock.h>
+#endif
 // newer SuSE kernels need this
 #include <linux/highmem.h>
 
@@ -1049,7 +1051,11 @@ static int __init firegl_init_module(voi
     dev->pubdev.signature = FGL_DEVICE_SIGNATURE;
 
     for (i = 0; i < __KE_MAX_SPINLOCKS; i++)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
         dev->spinlock[i] = SPIN_LOCK_UNLOCKED;
+#else
+        dev->spinlock[i] = __SPIN_LOCK_UNLOCKED(old_style_spin_init);
+#endif
 
     for (i=0; i < __KE_MAX_SEMAPHORES; i++)
         sema_init(&dev->struct_sem[i], 1);
@@ -1900,13 +1906,17 @@ void ATI_API_CALL KCL_spin_unlock(void *
 /** \brief Grab global kernel lock */
 void ATI_API_CALL KCL_GlobalKernelLock(void)
 {
+#ifdef CONFIG_KERNEL_LOCK
     lock_kernel();
+#endif
 }
 
 /** \brief Release global kernel lock */
 void ATI_API_CALL KCL_GlobalKernelUnlock(void)
 {
+#ifdef CONFIG_KERNEL_LOCK
     unlock_kernel();
+#endif
 }
 
 /*****************************************************************************/
--- drmP.h.orig	2011-05-10 22:17:00.000000000 +0200
+++ drmP.h	2011-05-11 01:32:09.399610802 +0200
@@ -57,7 +57,9 @@
 #include <linux/pci.h>
 #include <linux/version.h>
 #include <linux/sched.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
 #include <linux/smp_lock.h>	/* For (un)lock_kernel */
+#endif
 #include <linux/mm.h>
 #include <linux/pagemap.h>
 #if defined(__alpha__) || defined(__powerpc__)
 #if defined(__alpha__) || defined(__powerpc__)