[PATCH 19/26] mtd: nand: orion: Use nand_to_mtd()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux