summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_imx.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-11-13 01:04:17 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-11-13 08:52:59 +0100
commit5a05054331c96b5503e49f2e00b2726c5e141d74 (patch)
treed2444c941f84fe18d8d86109e834fe0db3757e63 /drivers/mtd/nand/nand_imx.c
parentc2fa7340a961d10f9552babad4785cf0deb75e2c (diff)
downloadbarebox-5a05054331c96b5503e49f2e00b2726c5e141d74.tar.gz
barebox-5a05054331c96b5503e49f2e00b2726c5e141d74.tar.xz
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 <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/nand/nand_imx.c')
-rw-r--r--drivers/mtd/nand/nand_imx.c2
1 files changed, 1 insertions, 1 deletions
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;