From 5a05054331c96b5503e49f2e00b2726c5e141d74 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Fri, 13 Nov 2020 01:04:17 +0100 Subject: mtd: nand-imx: fix passing pointer of wrong type on NAND_CMD_READOOB copy_spare used to take a mtd_info, but since 5f605dc6168c ("mtd: nand: Pass struct nand_chip around") it now takes a nand_chip. 3588d40c5385 ("mtd: nand-imx: repair reading the oob area") was drafted in parallel and still passes a mtd_info. Their merge did not adjust this, triggering a compiler warning and undefined behavior. Fix this. Fixes: 7b1d8b4b3561 ("Merge branch 'for-next/mtd-nand'") Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- drivers/mtd/nand/nand_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/nand_imx.c b/drivers/mtd/nand/nand_imx.c index 3d4082fe18..0f20e9d394 100644 --- a/drivers/mtd/nand/nand_imx.c +++ b/drivers/mtd/nand/nand_imx.c @@ -1022,7 +1022,7 @@ static void imx_nand_command(struct nand_chip *chip, unsigned command, */ if (command == NAND_CMD_READOOB) { host->send_page(host, NFC_OUTPUT); - copy_spare(mtd, 1, host->data_buf + mtd->writesize); + copy_spare(chip, 1, host->data_buf + mtd->writesize); } break; -- cgit v1.2.3