diff options
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 02e58f5ac721..b73f3c4e892b 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -59,7 +59,7 @@ | |||
59 | * The AG-AND chips have nice features for speed improvement, | 59 | * The AG-AND chips have nice features for speed improvement, |
60 | * which are not supported yet. Read / program 4 pages in one go. | 60 | * which are not supported yet. Read / program 4 pages in one go. |
61 | * | 61 | * |
62 | * $Id: nand_base.c,v 1.140 2005/04/04 18:56:29 gleixner Exp $ | 62 | * $Id: nand_base.c,v 1.141 2005/04/06 20:13:05 dbrown Exp $ |
63 | * | 63 | * |
64 | * This program is free software; you can redistribute it and/or modify | 64 | * This program is free software; you can redistribute it and/or modify |
65 | * it under the terms of the GNU General Public License version 2 as | 65 | * it under the terms of the GNU General Public License version 2 as |
@@ -1285,13 +1285,12 @@ int nand_do_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, | |||
1285 | switch(oobsel->useecc) { | 1285 | switch(oobsel->useecc) { |
1286 | case MTD_NANDECC_AUTOPLACE: | 1286 | case MTD_NANDECC_AUTOPLACE: |
1287 | /* Walk through the autoplace chunks */ | 1287 | /* Walk through the autoplace chunks */ |
1288 | for (i = 0, j = 0; j < mtd->oobavail; i++) { | 1288 | for (i = 0; oobsel->oobfree[i][1]; i++) { |
1289 | int from = oobsel->oobfree[i][0]; | 1289 | int from = oobsel->oobfree[i][0]; |
1290 | int num = oobsel->oobfree[i][1]; | 1290 | int num = oobsel->oobfree[i][1]; |
1291 | memcpy(&oob_buf[oob], &oob_data[from], num); | 1291 | memcpy(&oob_buf[oob], &oob_data[from], num); |
1292 | j+= num; | 1292 | oob += num; |
1293 | } | 1293 | } |
1294 | oob += mtd->oobavail; | ||
1295 | break; | 1294 | break; |
1296 | case MTD_NANDECC_PLACE: | 1295 | case MTD_NANDECC_PLACE: |
1297 | /* YAFFS1 legacy mode */ | 1296 | /* YAFFS1 legacy mode */ |