aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/maps/physmap.c8
-rw-r--r--include/linux/mtd/physmap.h1
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index 829aa4bee54f..4c18b98a3110 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -136,8 +136,12 @@ static int physmap_flash_probe(struct platform_device *dev)
136 simple_map_init(&info->map[i]); 136 simple_map_init(&info->map[i]);
137 137
138 probe_type = rom_probe_types; 138 probe_type = rom_probe_types;
139 for (; info->mtd[i] == NULL && *probe_type != NULL; probe_type++) 139 if (physmap_data->probe_type == NULL) {
140 info->mtd[i] = do_map_probe(*probe_type, &info->map[i]); 140 for (; info->mtd[i] == NULL && *probe_type != NULL; probe_type++)
141 info->mtd[i] = do_map_probe(*probe_type, &info->map[i]);
142 } else
143 info->mtd[i] = do_map_probe(physmap_data->probe_type, &info->map[i]);
144
141 if (info->mtd[i] == NULL) { 145 if (info->mtd[i] == NULL) {
142 dev_err(&dev->dev, "map_probe failed\n"); 146 dev_err(&dev->dev, "map_probe failed\n");
143 err = -ENXIO; 147 err = -ENXIO;
diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h
index 76f7cabf07d3..bcfd9f777454 100644
--- a/include/linux/mtd/physmap.h
+++ b/include/linux/mtd/physmap.h
@@ -25,6 +25,7 @@ struct physmap_flash_data {
25 void (*set_vpp)(struct map_info *, int); 25 void (*set_vpp)(struct map_info *, int);
26 unsigned int nr_parts; 26 unsigned int nr_parts;
27 unsigned int pfow_base; 27 unsigned int pfow_base;
28 char *probe_type;
28 struct mtd_partition *parts; 29 struct mtd_partition *parts;
29}; 30};
30 31