summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/mxc_nand.c
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2010-05-31 07:49:40 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-07-26 14:17:53 +0200
commitcce02464dd4733e8173d01a9a7a3ff5491c8546b (patch)
tree01e3c2b87ba9a272cef82466e1377ccc891dc159 /drivers/mtd/nand/mxc_nand.c
parentmxc_nand: Fix OOB handling (diff)
downloadlinux-cce02464dd4733e8173d01a9a7a3ff5491c8546b.tar.xz
linux-cce02464dd4733e8173d01a9a7a3ff5491c8546b.zip
mxc_nand: add support for platform defined partitions
Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/nand/mxc_nand.c')
-rw-r--r--drivers/mtd/nand/mxc_nand.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 6e8aa34e4dfc..0d76b169482f 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -832,6 +832,8 @@ static int __init mxcnd_probe(struct platform_device *pdev)
parse_mtd_partitions(mtd, part_probes, &host->parts, 0);
if (nr_parts > 0)
add_mtd_partitions(mtd, host->parts, nr_parts);
+ else if (pdata->parts)
+ add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts);
else
#endif
{