summaryrefslogtreecommitdiff
path: root/recipes/ti/files/cmem-class-device-27-and-sched-include-fix.patch
blob: 8eb3210bb137c3eb12828c24a3075b331e9e21a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff -uNr codec_engine_2_21/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c codec_engine_2_21_fix/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
--- codec_engine_2_21/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c	2009-02-12 22:02:15.000000000 +0000
+++ codec_engine_2_21_fix/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c	2009-02-12 22:08:49.000000000 +0000
@@ -29,6 +29,7 @@
 #include <linux/mm.h>
 #include <linux/seq_file.h>
 #include <linux/vmalloc.h>
+#include <linux/sched.h>
 #include <asm/cacheflush.h>
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -1710,7 +1711,11 @@
 #ifdef USE_CLASS_DEVICE
     class_device_create(cmem_class, NULL, MKDEV(cmem_major, 0), NULL, "cmem");
 #else
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+    device_create(cmem_class, NULL, MKDEV(cmem_major, 0), NULL, "cmem");
+#else
     device_create(cmem_class, NULL, MKDEV(cmem_major, 0), "cmem");
+#endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
 #endif // USE_CLASS_DEVICE
 #endif // USE_CLASS_SIMPLE
 #endif // USE_UDEV