]> err.no Git - linux-2.6/commitdiff
[MTD] [OneNAND] Exit loop only when column start with 0
authorAdrian Hunter <ext-adrian.hunter@nokia.com>
Fri, 23 Mar 2007 08:16:22 +0000 (17:16 +0900)
committerDavid Woodhouse <dwmw2@infradead.org>
Wed, 25 Apr 2007 10:09:37 +0000 (11:09 +0100)
The JFFS2 requests OOB function from column 0.
But the oobtest in nand-tests doesn't.
So we only exit loop only when column start with 0.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/onenand/onenand_base.c

index b8535ad3b6148fab7e377aa5bab807297ca0605b..000794c6caf543682e686d23787f238ddf6d141c 100644 (file)
@@ -857,7 +857,7 @@ static int onenand_transfer_auto_oob(struct mtd_info *mtd, uint8_t *buf, int col
                        int n = ed - st;
                        memcpy(buf, oob_buf + st, n);
                        buf += n;
-               } else
+               } else if (column == 0)
                        break;
        }
        return 0;
@@ -1302,7 +1302,7 @@ static int onenand_fill_auto_oob(struct mtd_info *mtd, u_char *oob_buf,
                        int n = ed - st;
                        memcpy(oob_buf + st, buf, n);
                        buf += n;
-               } else
+               } else if (column == 0)
                        break;
        }
        return 0;