summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-11-05 09:55:51 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-11-09 23:04:01 +0100
commit18a8bfd6a7ea8e93b88fba49b73348b943713076 (patch)
tree40f86a6b831dadeebe16d2166c72c8970a1bdd74 /drivers/mtd
parentaff82704b0673e11a721e0399e0a3b6dba19bd5b (diff)
downloadbarebox-18a8bfd6a7ea8e93b88fba49b73348b943713076.tar.gz
barebox-18a8bfd6a7ea8e93b88fba49b73348b943713076.tar.xz
mtd: nand: orion: Use nand_to_mtd()
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@pengutronix.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/nand_orion.c2
1 files changed, 1 insertions, 1 deletions
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))