Skip to content

Commit

Permalink
mtd: rawnand: atmel: Drop redundant nand_read_page_op()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Reviewed-by: Tudor Ambarus <[email protected]>
Signed-off-by: Tudor Ambarus <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
  • Loading branch information
bbrezillon authored and miquelraynal committed Sep 30, 2020
1 parent b0155da commit dca3c3c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/mtd/nand/raw/atmel/nand-controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit dca3c3c

Please sign in to comment.