2009-05-15 19:16:47 +00:00
|
|
|
--- a/drivers/mtd/maps/physmap.c
|
|
|
|
+++ b/drivers/mtd/maps/physmap.c
|
2011-02-25 17:26:25 +00:00
|
|
|
@@ -173,6 +173,13 @@ static int physmap_flash_probe(struct pl
|
2009-05-15 19:16:47 +00:00
|
|
|
goto err_out;
|
|
|
|
|
|
|
|
#ifdef CONFIG_MTD_PARTITIONS
|
|
|
|
+ if (physmap_data->nr_parts) {
|
|
|
|
+ printk(KERN_NOTICE "Using physmap partition information\n");
|
|
|
|
+ add_mtd_partitions(info->cmtd, physmap_data->parts,
|
|
|
|
+ physmap_data->nr_parts);
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
err = parse_mtd_partitions(info->cmtd, part_probe_types,
|
|
|
|
&info->parts, 0);
|
|
|
|
if (err > 0) {
|
2011-02-25 17:26:25 +00:00
|
|
|
@@ -180,13 +187,6 @@ static int physmap_flash_probe(struct pl
|
2009-05-15 19:16:47 +00:00
|
|
|
info->nr_parts = err;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
-
|
|
|
|
- if (physmap_data->nr_parts) {
|
|
|
|
- printk(KERN_NOTICE "Using physmap partition information\n");
|
|
|
|
- add_mtd_partitions(info->cmtd, physmap_data->parts,
|
|
|
|
- physmap_data->nr_parts);
|
|
|
|
- return 0;
|
|
|
|
- }
|
|
|
|
#endif
|
|
|
|
|
|
|
|
add_mtd_device(info->cmtd);
|