summaryrefslogtreecommitdiff
path: root/packages/dsplink/files
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-10-30 12:09:28 +0100
committerKoen Kooi <koen@openembedded.org>2008-10-30 12:09:28 +0100
commitdb3b63202106159a4a3113eefc836589debdacff (patch)
treea7b8724f1236070ea86ad5ef62a048194b5b4318 /packages/dsplink/files
parent39430f1c3b573bb86abb455d2d8355a4e6214344 (diff)
ti-cmemk-module, codec-engine: add patch to fix builds with >=2.6.26 and class_device_* API change
Diffstat (limited to 'packages/dsplink/files')
-rw-r--r--packages/dsplink/files/cmemk-fix-class-device-api.diff89
1 files changed, 89 insertions, 0 deletions
diff --git a/packages/dsplink/files/cmemk-fix-class-device-api.diff b/packages/dsplink/files/cmemk-fix-class-device-api.diff
new file mode 100644
index 0000000000..c42e6ae927
--- /dev/null
+++ b/packages/dsplink/files/cmemk-fix-class-device-api.diff
@@ -0,0 +1,89 @@
+--- codec_engine_2_21_00_06/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2008-09-26 02:26:04.000000000 +0200
++++ codec_engine_2_21_00_06/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2008-10-30 11:57:54.000000000 +0100
+@@ -42,11 +26,20 @@
+ * USE_CLASS_SIMPLE - #define if Linux version contains class_simple,
+ * otherwise class is used (Linux supports one or the other, not both)
+ */
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+
+-#warning LINUX_VERSION_CODE >= 2.6.18
++#warning LINUX_VERSION_CODE >= 2.6.26
++
++#define USE_CACHE_VOID_ARG
++#undef USE_CLASS_DEVICE
++#undef USE_CLASS_SIMPLE
++
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
++
++#warning 2.6.26 > LINUX_VERSION_CODE >= 2.6.18
+
+ #define USE_CACHE_VOID_ARG
++#define USE_CLASS_DEVICE
+ #undef USE_CLASS_SIMPLE
+
+ #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) */
+@@ -54,6 +47,7 @@
+ #warning LINUX_VERSION_CODE < 2.6.18
+
+ #define USE_CLASS_SIMPLE
++#undef USE_CLASS_DEVICE
+ #undef USE_CACHE_VOID_ARG
+
+ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) */
+@@ -1697,12 +1691,12 @@
+ #ifdef USE_CLASS_SIMPLE
+ class_simple_device_add(cmem_class, MKDEV(cmem_major, 0), NULL, "cmem");
+ #else
+-/*
+- Use the following for newer GIT releases ( > 2.6.25?)
+- device_create(cmem_class, NULL, MKDEV(cmem_major, 0), "cmem");
+-*/
++#ifdef USE_CLASS_DEVICE
+ class_device_create(cmem_class, NULL, MKDEV(cmem_major, 0), NULL, "cmem");
+-#endif
++#else
++ device_create(cmem_class, NULL, MKDEV(cmem_major, 0), "cmem");
++#endif // USE_CLASS_DEVICE
++#endif // USE_CLASS_SIMPLE
+ #endif // USE_UDEV
+
+ pstart[0] = phys_start;
+@@ -1862,13 +1856,13 @@
+ class_simple_device_remove(MKDEV(cmem_major, 0));
+ class_simple_destroy(cmem_class);
+ #else
+-/*
+- Use the following for newer GIT releases ( > 2.6.25?)
+- device_destroy(cmem_class, MKDEV(cmem_major, 0));
+-*/
++#ifdef USE_CLASS_DEVICE
+ class_device_destroy(cmem_class, MKDEV(cmem_major, 0));
++#else
++ device_destroy(cmem_class, MKDEV(cmem_major, 0));
++#endif // USE_CLASS_DEVICE
+ class_destroy(cmem_class);
+-#endif
++#endif // USE_CLASS_SIMPLE
+
+ #endif // USE_UDEV
+
+@@ -1938,13 +1932,13 @@
+ class_simple_device_remove(MKDEV(cmem_major, 0));
+ class_simple_destroy(cmem_class);
+ #else
+-/*
+- Use the following for newer GIT releases ( > 2.6.25?)
+- device_destroy(cmem_class, MKDEV(cmem_major, 0));
+-*/
++#ifdef USE_CLASS_DEVICE
+ class_device_destroy(cmem_class, MKDEV(cmem_major, 0));
++#else
++ device_destroy(cmem_class, MKDEV(cmem_major, 0));
++#endif // USE_CLASS_DEVICE
+ class_destroy(cmem_class);
+-#endif
++#endif // USE_CLASS_SIMPLE
+
+ #endif // USE_UDEV
+