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

Signed-off-by: Sascha Hauer <[email protected]>
---
 drivers/mtd/nand/nand_orion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_orion.c b/drivers/mtd/nand/nand_orion.c
index c6f8dc68b4..785d877b3d 100644
--- a/drivers/mtd/nand/nand_orion.c
+++ b/drivers/mtd/nand/nand_orion.c
@@ -88,8 +88,8 @@ static int orion_nand_probe(struct device_d *dev)
        u32 val = 0;
 
        priv = xzalloc(sizeof(struct orion_nand));
-       mtd = &priv->chip.mtd;
        chip = &priv->chip;
+       mtd = nand_to_mtd(chip);
 
        iores = dev_request_mem_resource(dev, 0);
        if (IS_ERR(iores))
-- 
2.20.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to