MTD + kernel 2.2.18
David Vrabel
dvrabel at arcom.co.uk
Tue Dec 12 06:51:15 EST 2000
Hi,
I'm trying out MTD with kernel 2.2.18 and there appear to be some
problems with include/linux/mtd/compatmac.h. I wasn't entirely sure
what was required so find a patch attached to review.
Also some of the init functions (eg in cfi_probe.c) are incorrect. Are
they supposed to look like the ones in mtdcore.c?
David Vrabel
-------------- next part --------------
Index: compatmac.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/compatmac.h,v
retrieving revision 1.10
diff -u -r1.10 compatmac.h
--- compatmac.h 2000/11/30 16:39:19 1.10
+++ compatmac.h 2000/12/12 11:40:38
@@ -221,9 +221,12 @@
#include <linux/init.h>
#endif
-#if LINUX_VERSION_CODE < 0x20300
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18)
#define init_MUTEX(x) do {*(x) = MUTEX;} while (0)
#define init_MUTEX_LOCKED(x) do {*(x) = MUTEX_LOCKED;} while (0)
+#endif /* ERM? */
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
#define RQFUNC_ARG void
#define blkdev_dequeue_request(req) do {CURRENT = req->next;} while (0)
#else
@@ -244,11 +247,15 @@
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18)
#define DECLARE_WAIT_QUEUE_HEAD(x) struct wait_queue *x = NULL
#define init_waitqueue_head init_waitqueue
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
+
static inline int try_inc_mod_count(struct module *mod)
{
#ifdef CONFIG_MODULES
@@ -329,7 +336,7 @@
#include <linux/spinlock.h>
#endif
-#if LINUX_VERSION_CODE < 0x20300
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18)
#define set_current_state(state_value) \
do { current->state = (state_value); } while (0)
#endif
More information about the linux-mtd
mailing list