Commit c842f570 authored by Dmitry Eremin-Solenikov's avatar Dmitry Eremin-Solenikov Committed by Artem Bityutskiy

mtd: pxa3xx_nand don't specify default parsing options

Since 'cmdline, NULL' is now a default for parse_mtd_partitions, don't specify
this in every driver, instead pass NULL to force parse_mtd_partitions
to use default.
Signed-off-by: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 16b206e6
......@@ -1129,6 +1129,8 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
{
struct pxa3xx_nand_platform_data *pdata;
struct pxa3xx_nand_info *info;
struct mtd_partition *parts;
int nr_parts;
pdata = pdev->dev.platform_data;
if (!pdata) {
......@@ -1146,16 +1148,11 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
return -ENODEV;
}
if (mtd_has_cmdlinepart()) {
const char *probes[] = { "cmdlinepart", NULL };
struct mtd_partition *parts;
int nr_parts;
nr_parts = parse_mtd_partitions(info->mtd, probes, &parts, 0);
nr_parts = parse_mtd_partitions(info->mtd, NULL, &parts, 0);
if (nr_parts)
return mtd_device_register(info->mtd, parts, nr_parts);
}
if (nr_parts)
return mtd_device_register(info->mtd, parts, nr_parts);
return mtd_device_register(info->mtd, pdata->parts, pdata->nr_parts);
}
......
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