Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bff3c10d authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by David Woodhouse
Browse files

mtd: pxa32xx_nand: add support for partition table parsing



The pxa32xx_nand driver doesn't support partition tables from the
command line. This patch adds support for it.

Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 1dd2a092
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1319,6 +1319,17 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
		goto fail_free_irq;
	}

	if (mtd_has_cmdlinepart()) {
		static const char *probes[] = { "cmdlinepart", NULL };
		struct mtd_partition *parts;
		int nr_parts;

		nr_parts = parse_mtd_partitions(mtd, probes, &parts, 0);

		if (nr_parts)
			return add_mtd_partitions(mtd, parts, nr_parts);
	}

	return add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts);

fail_free_irq: