From: Adrian Hunter Date: Fri, 23 Mar 2007 08:16:22 +0000 (+0900) Subject: [MTD] [OneNAND] Exit loop only when column start with 0 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c36c46d53b2f95bfcbe992cfb541a78ab92310a4;p=linux-beck.git [MTD] [OneNAND] Exit loop only when column start with 0 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 Signed-off-by: Kyungmin Park Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index b8535ad3b614..000794c6caf5 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -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;