aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand/onenand_bbt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/onenand/onenand_bbt.c')
-rw-r--r--drivers/mtd/onenand/onenand_bbt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c
index 4510d3361eaa..aafd7c2f7802 100644
--- a/drivers/mtd/onenand/onenand_bbt.c
+++ b/drivers/mtd/onenand/onenand_bbt.c
@@ -87,13 +87,13 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
87 87
88 /* No need to read pages fully, 88 /* No need to read pages fully,
89 * just read required OOB bytes */ 89 * just read required OOB bytes */
90 ret = mtd->read_oob(mtd, from + j * mtd->oobblock + bd->offs, 90 ret = mtd->read_oob(mtd, from + j * mtd->writesize + bd->offs,
91 readlen, &retlen, &buf[0]); 91 readlen, &retlen, &buf[0]);
92 92
93 if (ret) 93 if (ret)
94 return ret; 94 return ret;
95 95
96 if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->oobblock, bd)) { 96 if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->writesize, bd)) {
97 bbm->bbt[i >> 3] |= 0x03 << (i & 0x6); 97 bbm->bbt[i >> 3] |= 0x03 << (i & 0x6);
98 printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n", 98 printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n",
99 i >> 1, (unsigned int) from); 99 i >> 1, (unsigned int) from);