mtd/include/linux/mtd compatmac.h,1.51,1.52

David Woodhouse dwmw2 at infradead.org
Fri May 16 20:22:38 EDT 2003


Update of /home/cvs/mtd/include/linux/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv12572

Modified Files:
	compatmac.h 
Log Message:
fix __module_get for built-in case

Index: compatmac.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/compatmac.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- compatmac.h	16 May 2003 10:06:53 -0000	1.51
+++ compatmac.h	17 May 2003 00:22:35 -0000	1.52
@@ -599,7 +599,7 @@
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,60)
 #define try_module_get(m) ({ __MOD_INC_USE_COUNT(m), 1; })
-#define __module_get(m) ({ __MOD_INC_USE_COUNT(m), 1; })
+#define __module_get(m) ({ ({if (m) __MOD_INC_USE_COUNT((struct module *)(m));}),1; })
 #define module_put(m) do { __MOD_DEC_USE_COUNT(m); } while(0)
 #define set_module_owner(x) do { x->owner = THIS_MODULE; } while(0)
 #endif




More information about the linux-mtd-cvs mailing list