[PATCH] fix cfi for collie flash

Thomas Kunze thommycheck at gmx.de
Tue Apr 22 21:16:09 EDT 2008


Again with (hopefully) no line wrappings.

Signed-off-by: Thomas Kunze <thommycheck at gmx.de>
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c 
b/drivers/mtd/chips/cfi_cmdset_0001.c
index 0080452..34da59b 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -618,7 +618,11 @@ static int cfi_intelext_partition_fixup(struct 
mtd_info *mtd,
                             + (rinfo->NumBlockTypes - 1) *
                               sizeof(struct cfi_intelext_blockinfo);
             }
-
+
+               /* if numregions=0 we have one big partition */
+               if(!numparts)
+                       numparts = 1;
+
             /* Programming Region info */
             if (extp->MinorVersion >= '4') {
                     struct cfi_intelext_programming_regioninfo *prinfo;




More information about the linux-mtd mailing list