aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/fsmc_nand.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 902ba0d9c32d..bd423390d330 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -549,7 +549,9 @@ static int fsmc_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
549 * to read at least 13 bytes even in case of 16 bit NAND 549 * to read at least 13 bytes even in case of 16 bit NAND
550 * devices 550 * devices
551 */ 551 */
552 len = roundup(len, 2); 552 if (chip->options & NAND_BUSWIDTH_16)
553 len = roundup(len, 2);
554
553 chip->cmdfunc(mtd, NAND_CMD_READOOB, off, page); 555 chip->cmdfunc(mtd, NAND_CMD_READOOB, off, page);
554 chip->read_buf(mtd, oob + j, len); 556 chip->read_buf(mtd, oob + j, len);
555 j += len; 557 j += len;