mtd: rawnand: atmel: Drop redundant nand_read_page_op()
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 20 Jul 2020 13:13:52 +0000 (16:13 +0300)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 30 Sep 2020 14:44:15 +0000 (16:44 +0200)
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@collabora.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200720131356.1579073-3-tudor.ambarus@microchip.com
drivers/mtd/nand/raw/atmel/nand-controller.c

index 21f4f7f..420f193 100644 (file)
@@ -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;