diff options
Diffstat (limited to 'packages/dsplink/files/cmemk-fix-class-device-api.diff')
-rw-r--r-- | packages/dsplink/files/cmemk-fix-class-device-api.diff | 89 |
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 + |