Commit c36c46d5 authored by Adrian Hunter's avatar Adrian Hunter Committed by David Woodhouse

[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: default avatarAdrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent ad286343
...@@ -857,7 +857,7 @@ static int onenand_transfer_auto_oob(struct mtd_info *mtd, uint8_t *buf, int col ...@@ -857,7 +857,7 @@ static int onenand_transfer_auto_oob(struct mtd_info *mtd, uint8_t *buf, int col
int n = ed - st; int n = ed - st;
memcpy(buf, oob_buf + st, n); memcpy(buf, oob_buf + st, n);
buf += n; buf += n;
} else } else if (column == 0)
break; break;
} }
return 0; return 0;
...@@ -1302,7 +1302,7 @@ static int onenand_fill_auto_oob(struct mtd_info *mtd, u_char *oob_buf, ...@@ -1302,7 +1302,7 @@ static int onenand_fill_auto_oob(struct mtd_info *mtd, u_char *oob_buf,
int n = ed - st; int n = ed - st;
memcpy(oob_buf + st, buf, n); memcpy(oob_buf + st, buf, n);
buf += n; buf += n;
} else } else if (column == 0)
break; break;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment