| 1 | --- a/drivers/mtd/maps/physmap.c |
| 2 | +++ b/drivers/mtd/maps/physmap.c |
| 3 | @@ -173,6 +173,13 @@ static int physmap_flash_probe(struct pl |
| 4 | goto err_out; |
| 5 | |
| 6 | #ifdef CONFIG_MTD_PARTITIONS |
| 7 | + if (physmap_data->nr_parts) { |
| 8 | + printk(KERN_NOTICE "Using physmap partition information\n"); |
| 9 | + add_mtd_partitions(info->cmtd, physmap_data->parts, |
| 10 | + physmap_data->nr_parts); |
| 11 | + return 0; |
| 12 | + } |
| 13 | + |
| 14 | err = parse_mtd_partitions(info->cmtd, part_probe_types, |
| 15 | &info->parts, 0); |
| 16 | if (err > 0) { |
| 17 | @@ -180,13 +187,6 @@ static int physmap_flash_probe(struct pl |
| 18 | info->nr_parts = err; |
| 19 | return 0; |
| 20 | } |
| 21 | - |
| 22 | - if (physmap_data->nr_parts) { |
| 23 | - printk(KERN_NOTICE "Using physmap partition information\n"); |
| 24 | - add_mtd_partitions(info->cmtd, physmap_data->parts, |
| 25 | - physmap_data->nr_parts); |
| 26 | - return 0; |
| 27 | - } |
| 28 | #endif |
| 29 | |
| 30 | add_mtd_device(info->cmtd); |
| 31 | |