summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2015-12-10 09:00:17 +0100
committerBrian Norris <computersforpeace@gmail.com>2015-12-18 19:54:41 +0100
commit53cd2681e02bee59e433b20934bf71f4db5a87d8 (patch)
treedaf02d19d3e0c1afbf9813a42d8967074d6dd692 /drivers/mtd
parentmtd: nand: omap2: use the mtd instance embedded in struct nand_chip (diff)
downloadlinux-53cd2681e02bee59e433b20934bf71f4db5a87d8.tar.xz
linux-53cd2681e02bee59e433b20934bf71f4db5a87d8.zip
mtd: nand: orion: use the mtd instance embedded in struct nand_chip
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/orion_nand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
index 4ed4f676ee05..087a04024d6a 100644
--- a/drivers/mtd/nand/orion_nand.c
+++ b/drivers/mtd/nand/orion_nand.c
@@ -85,11 +85,11 @@ static int __init orion_nand_probe(struct platform_device *pdev)
u32 val = 0;
nc = devm_kzalloc(&pdev->dev,
- sizeof(struct nand_chip) + sizeof(struct mtd_info),
+ sizeof(struct nand_chip),
GFP_KERNEL);
if (!nc)
return -ENOMEM;
- mtd = (struct mtd_info *)(nc + 1);
+ mtd = nand_to_mtd(nc);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
io_base = devm_ioremap_resource(&pdev->dev, res);