Skip to contentSkip to conversation

don't try to set ROOT_DEV from modular mtd drivers

PATCH New Christoph Hellwig 1 participant 1 message Mar 31, 2005 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 don't try to set ROOT_DEV from modular mtd drivers

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.

drivers/mtd/maps/nettel.c +1 -1
@@ -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
 
drivers/mtd/maps/uclinux.c +2 -0
@@ -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);