diff options
Diffstat (limited to 'extras/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch')
-rw-r--r-- | extras/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/extras/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch b/extras/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch new file mode 100644 index 00000000..29b0a444 --- /dev/null +++ b/extras/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From: Koen Kooi <k-kooi@ti.com> | ||
2 | Subject: linuxutils: fix build with 2.6.37rcX | ||
3 | |||
4 | --- | ||
5 | |||
6 | --- /tmp/cmemk.c 2010-12-05 18:41:00.000000000 +0100 | ||
7 | +++ linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2010-12-05 18:43:24.000000000 +0100 | ||
8 | @@ -31,6 +31,7 @@ | ||
9 | #include <linux/seq_file.h> | ||
10 | #include <linux/vmalloc.h> | ||
11 | #include <linux/sched.h> | ||
12 | +#include <linux/slab.h> | ||
13 | #include <asm/cacheflush.h> | ||
14 | #include <asm/uaccess.h> | ||
15 | #include <asm/pgtable.h> | ||
16 | @@ -204,7 +205,11 @@ | ||
17 | "\n\t\t fall back to a heap-based allocation attempt"); | ||
18 | module_param(useHeapIfPoolUnavailable, int, S_IRUGO); | ||
19 | |||
20 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) | ||
21 | +static DEFINE_SEMAPHORE(cmem_mutex); | ||
22 | +#else | ||
23 | static DECLARE_MUTEX(cmem_mutex); | ||
24 | +#endif | ||
25 | |||
26 | /* Describes a pool buffer */ | ||
27 | typedef struct pool_buffer { | ||
28 | @@ -243,8 +248,12 @@ | ||
29 | |||
30 | static struct file_operations cmem_fxns = { | ||
31 | owner: THIS_MODULE, | ||
32 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) | ||
33 | + unlocked_ioctl: ioctl, | ||
34 | +#else | ||
35 | ioctl: ioctl, | ||
36 | - mmap: mmap, | ||
37 | +#endif | ||
38 | + mmap: mmap, | ||
39 | open: open, | ||
40 | release: release | ||
41 | }; | ||
42 | --- /tmp/sdmak.c 2010-12-05 18:43:55.000000000 +0100 | ||
43 | +++ linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c 2010-12-05 18:48:31.000000000 +0100 | ||
44 | @@ -208,9 +208,12 @@ | ||
45 | } | ||
46 | |||
47 | up_read(¤t->mm->mmap_sem); | ||
48 | - | ||
49 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) | ||
50 | + sema_init(&(channels[channel].mutex),1); | ||
51 | +#else | ||
52 | init_MUTEX_LOCKED(&(channels[channel].mutex)); | ||
53 | - channels[channel].owner = filp; | ||
54 | +#endif | ||
55 | + channels[channel].owner = filp; | ||
56 | |||
57 | if (copy_to_user(argp, &channel, sizeof(channel))) { | ||
58 | return -EFAULT; | ||
59 | @@ -286,8 +289,12 @@ | ||
60 | } | ||
61 | |||
62 | static struct file_operations fops = { | ||
63 | - .ioctl = dma_ioctl, | ||
64 | - .release = dma_release, | ||
65 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) | ||
66 | + .unlocked_ioctl = dma_ioctl, | ||
67 | +#else | ||
68 | + .ioctl = dma_ioctl, | ||
69 | +#endif | ||
70 | + .release = dma_release, | ||
71 | .owner = THIS_MODULE | ||
72 | }; | ||
73 | |||