aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/onenand/onenand_bbt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c
index 01ab5b3c453b..905209bf9465 100644
--- a/drivers/mtd/onenand/onenand_bbt.c
+++ b/drivers/mtd/onenand/onenand_bbt.c
@@ -91,13 +91,15 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
91 for (j = 0; j < len; j++) { 91 for (j = 0; j < len; j++) {
92 /* No need to read pages fully, 92 /* No need to read pages fully,
93 * just read required OOB bytes */ 93 * just read required OOB bytes */
94 ret = onenand_bbt_read_oob(mtd, from + j * mtd->writesize + bd->offs, &ops); 94 ret = onenand_bbt_read_oob(mtd,
95 from + j * this->writesize + bd->offs, &ops);
95 96
96 /* If it is a initial bad block, just ignore it */ 97 /* If it is a initial bad block, just ignore it */
97 if (ret == ONENAND_BBT_READ_FATAL_ERROR) 98 if (ret == ONENAND_BBT_READ_FATAL_ERROR)
98 return -EIO; 99 return -EIO;
99 100
100 if (ret || check_short_pattern(&buf[j * scanlen], scanlen, mtd->writesize, bd)) { 101 if (ret || check_short_pattern(&buf[j * scanlen],
102 scanlen, this->writesize, bd)) {
101 bbm->bbt[i >> 3] |= 0x03 << (i & 0x6); 103 bbm->bbt[i >> 3] |= 0x03 << (i & 0x6);
102 printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n", 104 printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n",
103 i >> 1, (unsigned int) from); 105 i >> 1, (unsigned int) from);