Commit 842b1a10 authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by David Woodhouse

[MTD] [NAND] at91_nand: Make mtdparts option can override board info

Call parse_mtd_partitions before checking board's partition_info, so
that "mtdparts=" option can override board's default setting.
Signed-off-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 79dcd8e9
...@@ -156,14 +156,14 @@ static int __init at91_nand_probe(struct platform_device *pdev) ...@@ -156,14 +156,14 @@ static int __init at91_nand_probe(struct platform_device *pdev)
} }
#ifdef CONFIG_MTD_PARTITIONS #ifdef CONFIG_MTD_PARTITIONS
if (host->board->partition_info)
partitions = host->board->partition_info(mtd->size, &num_partitions);
#ifdef CONFIG_MTD_CMDLINE_PARTS #ifdef CONFIG_MTD_CMDLINE_PARTS
else { mtd->name = "at91_nand";
mtd->name = "at91_nand"; num_partitions = parse_mtd_partitions(mtd, part_probes,
num_partitions = parse_mtd_partitions(mtd, part_probes, &partitions, 0); &partitions, 0);
}
#endif #endif
if (num_partitions <= 0 && host->board->partition_info)
partitions = host->board->partition_info(mtd->size,
&num_partitions);
if ((!partitions) || (num_partitions == 0)) { if ((!partitions) || (num_partitions == 0)) {
printk(KERN_ERR "at91_nand: No parititions defined, or unsupported device.\n"); printk(KERN_ERR "at91_nand: No parititions defined, or unsupported device.\n");
......
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