[PATCH] don't try to set ROOT_DEV from modular mtd drivers

Christoph Hellwig hch at lst.de
Thu Mar 31 14:52:54 EST 2005


Personally I think setting ROOT_DEV from drivers is a really bad idea
(and these two are the only two drivers actually doing it), but at least
let's do it only for the builtin case so we can kill the ROOT_DEV
export.


--- 1.8/drivers/mtd/maps/nettel.c	2005-01-05 18:17:45 +01:00
+++ edited/drivers/mtd/maps/nettel.c	2005-03-31 21:55:47 +02:00
@@ -415,7 +415,7 @@
 
 	intel_mtd->owner = THIS_MODULE;
 
-#ifndef CONFIG_BLK_DEV_INITRD
+#if !defined(MODULE) && !defined(CONFIG_BLK_DEV_INITRD)
 	ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, 1);
 #endif
 
--- 1.9/drivers/mtd/maps/uclinux.c	2005-01-05 19:08:36 +01:00
+++ edited/drivers/mtd/maps/uclinux.c	2005-03-31 21:55:38 +02:00
@@ -94,7 +94,9 @@
 
 	printk("uclinux[mtd]: set %s to be root filesystem\n",
 	     	uclinux_romfs[0].name);
+#ifndef MODULE
 	ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, 0);
+#endif
 	put_mtd_device(mtd);
 
 	return(0);




More information about the linux-mtd mailing list