mtd/drivers/mtd/maps dc21285.c,1.7,1.8

rmk at infradead.org rmk at infradead.org
Mon Oct 14 08:20:09 EDT 2002


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

Modified Files:
	dc21285.c 
Log Message:
- Don't use __ioremap, use ioremap instead
- If the flash doesn't contain a redboot partition, add the whole device.


Index: dc21285.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/dc21285.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- dc21285.c	11 Oct 2001 16:17:51 -0000	1.7
+++ dc21285.c	14 Oct 2002 12:20:06 -0000	1.8
@@ -131,7 +131,7 @@
 		dc21285_map.buswidth*8);
 
 	/* Let's map the flash area */
-	dc21285_map.map_priv_1 = (unsigned long)__ioremap(DC21285_FLASH, 16*1024*1024, 0);
+	dc21285_map.map_priv_1 = (unsigned long)ioremap(DC21285_FLASH, 16*1024*1024);
 	if (!dc21285_map.map_priv_1) {
 		printk("Failed to ioremap\n");
 		return -EIO;
@@ -139,20 +139,21 @@
 
 	mymtd = do_map_probe("cfi_probe", &dc21285_map);
 	if (mymtd) {
-		int nrparts;
+		int nrparts = 0;
 
 		mymtd->module = THIS_MODULE;
 			
 		/* partition fixup */
 
+#ifdef CONFIG_MTD_REDBOOT_PARTS
 		nrparts = parse_redboot_partitions(mymtd, &dc21285_parts);
-		if (nrparts <=0) {
+#endif
+		if (nrparts > 0) {
+			add_mtd_partitions(mymtd, dc21285_parts, nrparts);
+		} else if (nrparts == 0) {
 			printk(KERN_NOTICE "RedBoot partition table failed\n");
-			iounmap((void *)dc21285_map.map_priv_1);
-			return -ENXIO;
+			add_mtd_device(mymtd);
 		}
-
-		add_mtd_partitions(mymtd, dc21285_parts, nrparts);
 
 		/* 
 		 * Flash timing is determined with bits 19-16 of the





More information about the linux-mtd-cvs mailing list