Commit f2e5a244 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by David Woodhouse

mtd: plat_nand: Add default partition parser to driver

Use cmdlinepart as the default partition parser and allow the arch setup code
to still use their own partition parsers.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 9ff00d58
...@@ -23,6 +23,8 @@ struct plat_nand_data { ...@@ -23,6 +23,8 @@ struct plat_nand_data {
void __iomem *io_base; void __iomem *io_base;
}; };
static const char *part_probe_types[] = { "cmdlinepart", NULL };
/* /*
* Probe for the NAND device. * Probe for the NAND device.
*/ */
...@@ -31,6 +33,7 @@ static int __devinit plat_nand_probe(struct platform_device *pdev) ...@@ -31,6 +33,7 @@ static int __devinit plat_nand_probe(struct platform_device *pdev)
struct platform_nand_data *pdata = pdev->dev.platform_data; struct platform_nand_data *pdata = pdev->dev.platform_data;
struct plat_nand_data *data; struct plat_nand_data *data;
struct resource *res; struct resource *res;
const char **part_types;
int err = 0; int err = 0;
if (pdata->chip.nr_chips < 1) { if (pdata->chip.nr_chips < 1) {
...@@ -98,8 +101,9 @@ static int __devinit plat_nand_probe(struct platform_device *pdev) ...@@ -98,8 +101,9 @@ static int __devinit plat_nand_probe(struct platform_device *pdev)
goto out; goto out;
} }
err = mtd_device_parse_register(&data->mtd, part_types = pdata->chip.part_probe_types ? : part_probe_types;
pdata->chip.part_probe_types, NULL,
err = mtd_device_parse_register(&data->mtd, part_types, NULL,
pdata->chip.partitions, pdata->chip.partitions,
pdata->chip.nr_partitions); pdata->chip.nr_partitions);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment