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@xxxxxxxxxxxxxx> --- 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 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox