[PATCH v4 2/6] mtd: rawnand: atmel: Drop redundant nand_read_page_op()
Tudor Ambarus
tudor.ambarus at microchip.com
Mon Jul 20 00:27:55 EDT 2020
From: Boris Brezillon <boris.brezillon at collabora.com>
The legacy page read path in atmel_hsmc_nand_pmecc_read_pg() issues
a nand_read_page_op() that's already issued by
atmel_nand_pmecc_read_pg(). Let's get rid of the unneeded one.
Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus at microchip.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus at microchip.com>
---
drivers/mtd/nand/raw/atmel/nand-controller.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
index e85652512daa..f738c4bfbd77 100644
--- a/drivers/mtd/nand/raw/atmel/nand-controller.c
+++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
@@ -983,12 +983,9 @@ static int atmel_hsmc_nand_pmecc_read_pg(struct nand_chip *chip, u8 *buf,
* connected to a native SoC R/B pin. If that's not the case, fallback
* to the non-optimized one.
*/
- if (nand->activecs->rb.type != ATMEL_NAND_NATIVE_RB) {
- nand_read_page_op(chip, page, 0, NULL, 0);
-
+ if (nand->activecs->rb.type != ATMEL_NAND_NATIVE_RB)
return atmel_nand_pmecc_read_pg(chip, buf, oob_required, page,
raw);
- }
nc->op.cmds[nc->op.ncmds++] = NAND_CMD_READ0;
--
2.25.1
More information about the linux-mtd
mailing list