Applying MTD to 2.2.x kernel, with more info

David Woodhouse dwmw2 at infradead.org
Mon Aug 13 19:54:02 EDT 2001


It _should_ all work in 2.2, even as modules. But I don't test it often. I 
really ought to verify it and fix the bits which break, then feed it to Alan 
for 2.2.next.


pallaire at gameloft.com said:
> 		chipreg.c: In function `do_map_probe':
> 		chipreg.c:67: parse error before `do'

67:	if (!drv && !request_module(name)) {

2.2 defines request_module as do{}while(0) ifndef CONFIG_KMOD. Which is 
broken.

Index: include/linux/kmod.h
===================================================================
RCS file: /inst/cvs/linux/include/linux/kmod.h,v
retrieving revision 1.3
diff -u -r1.3 kmod.h
--- include/linux/kmod.h	2000/12/04 15:09:02	1.3
+++ include/linux/kmod.h	2001/08/13 23:53:05
@@ -13,7 +13,10 @@
 #else
 #include <linux/errno.h>
 
-#define request_module(x) do {} while(0)
+static inline int request_module(const char *name)
+{
+	return -EINVAL;
+}
 static inline int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
 {
         return -EACCES;


--
dwmw2






More information about the linux-mtd mailing list