[PATCH 18/26] mtd: nand: gpmi: Use nand_to_mtd()

Sascha Hauer s.hauer at pengutronix.de
Fri Nov 6 08:38:52 EST 2020


We have a function for getting from the struct nand_chip * to the struct
mtd_info *, so use it.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/mtd/nand/nand_mxs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c
index 2cf72178bf..7504909faa 100644
--- a/drivers/mtd/nand/nand_mxs.c
+++ b/drivers/mtd/nand/nand_mxs.c
@@ -2190,7 +2190,7 @@ static int mxs_nand_probe(struct device_d *dev)
 
 	/* structures must be linked */
 	chip = &nand_info->nand_chip;
-	mtd = &nand_info->nand_chip.mtd;
+	mtd = nand_to_mtd(chip);
 	mtd->dev.parent = dev;
 
 	chip->priv = nand_info;
-- 
2.20.1




More information about the barebox mailing list