mtd/drivers/mtd mtdchar.c,1.78,1.79

Artem Bityutskiy dedekind at infradead.org
Fri Jan 6 08:35:34 EST 2006


Update of /home/cvs/mtd/drivers/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv32471

Modified Files:
	mtdchar.c 
Log Message:
[MTD] fix MTD compilation errors with kernels < 2.6.13

Kernels < 2.6.13 do not have class_device_create() at all, and it is defined in
compatmac.h. But macros in compatmac.h assume class_device_create() has 5
arguments, not 6. So, extend the 5-arg case for all kernels in range
[2.6.0-2.6.12]. Note, this is anyway is an ugly hack and by no means have to
go to mainline.

From: Lenar D. Tukhvatullin <lenar at netroad.ru>
Acked-by: Artem B. Bityutskiy <dedekind at infradead.org>



Index: mtdchar.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtdchar.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- mtdchar.c	27 Dec 2005 14:44:02 -0000	1.78
+++ mtdchar.c	6 Jan 2006 13:35:31 -0000	1.79
@@ -26,10 +26,10 @@
 	if (!mtd)
 		return;
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) && \
-    LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
 	/* 
-	 * In 2.6.13 and 2.6.14 kernels class_device_create() had different prototype.
+	 * In 2.6.13 and 2.6.14 kernels class_device_create() had different
+	 * prototype (they had no 'parent' paremater).
 	 * No idea how to fix it in compatmac.h, so this is a hotfix. Must go sometime.
 	 */
 	class_device_create(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2),





More information about the linux-mtd-cvs mailing list