aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/powervr-drivers/omap3-sgx-modules/update.patch
blob: 08ede82e51a76cd51cd6e91208c95426d9192b30 (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
From: Koen Kooi <k-kooi@ti.com>
Subject: omap3-sgx-modules: make it build with recent kernels

This patch fixes 2 problems:

1) use of omap_rev_*_*() to get ES revision, the patch adding that to the kernel was rejected
2) removal of .ioctl from struct file_operations for BKL restructuring

Signed-off-by: Koen Kooi <k-kooi@ti.com>

--- /tmp/bc_cat.c	2010-11-23 14:38:14.000000000 +0100
+++ GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c	2010-11-23 14:47:12.000000000 +0100
@@ -28,6 +28,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/fs.h>
+#include <linux/version.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <img_defs.h>
@@ -121,8 +122,15 @@
 static struct file_operations bc_cat_fops = {
     .open =  bc_open,
     .release = bc_release,
-    .ioctl = bc_ioctl,
-    .mmap =  bc_mmap,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
+	.ioctl = bc_ioctl,
+#else
+	.unlocked_ioctl = bc_ioctl,
+#ifdef CONFIG_COMPAT
+    .compat_ioctl = bc_ioctl,
+#endif
+#endif
+	.mmap =  bc_mmap,
 };
 
 
@@ -492,7 +500,7 @@
 #ifdef PLAT_TI8168  
    width_align = 8;
 #else
-   width_align = cpu_is_omap3530() && omap_rev_lt_3_0() ? 32 : 8;   
+   width_align = cpu_is_omap3530() && omap_rev() < OMAP3430_REV_ES3_0 ? 32 : 8;   
 #endif    
     major = register_chrdev(0, DEVNAME, &bc_cat_fops);