aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r--drivers/mtd/nand/nand_base.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index c8cbc00243fe..975b2ef61121 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1204,7 +1204,7 @@ static int nand_write_oob_syndrome(struct mtd_info *mtd,
1204 pos = steps * (eccsize + chunk); 1204 pos = steps * (eccsize + chunk);
1205 steps = 0; 1205 steps = 0;
1206 } else 1206 } else
1207 pos = eccsize + chunk; 1207 pos = eccsize;
1208 1208
1209 chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page); 1209 chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page);
1210 for (i = 0; i < steps; i++) { 1210 for (i = 0; i < steps; i++) {
@@ -1567,7 +1567,7 @@ static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob,
1567 bytes = min_t(size_t, len, free->length); 1567 bytes = min_t(size_t, len, free->length);
1568 boffs = free->offset; 1568 boffs = free->offset;
1569 } 1569 }
1570 memcpy(chip->oob_poi + woffs, oob, bytes); 1570 memcpy(chip->oob_poi + boffs, oob, bytes);
1571 oob += bytes; 1571 oob += bytes;
1572 } 1572 }
1573 return oob; 1573 return oob;
@@ -2224,7 +2224,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
2224 } 2224 }
2225 2225
2226 /* Try to identify manufacturer */ 2226 /* Try to identify manufacturer */
2227 for (maf_idx = 0; nand_manuf_ids[maf_idx].id != 0x0; maf_id++) { 2227 for (maf_idx = 0; nand_manuf_ids[maf_idx].id != 0x0; maf_idx++) {
2228 if (nand_manuf_ids[maf_idx].id == *maf_id) 2228 if (nand_manuf_ids[maf_idx].id == *maf_id)
2229 break; 2229 break;
2230 } 2230 }