diff options
| -rw-r--r-- | drivers/mtd/maps/physmap.c | 5 | ||||
| -rw-r--r-- | include/linux/mtd/physmap.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index 66e8200079c2..1f749d58ae6f 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c | |||
| @@ -85,6 +85,7 @@ static int physmap_flash_probe(struct platform_device *dev) | |||
| 85 | struct physmap_flash_data *physmap_data; | 85 | struct physmap_flash_data *physmap_data; |
| 86 | struct physmap_flash_info *info; | 86 | struct physmap_flash_info *info; |
| 87 | const char **probe_type; | 87 | const char **probe_type; |
| 88 | const char **part_types; | ||
| 88 | int err = 0; | 89 | int err = 0; |
| 89 | int i; | 90 | int i; |
| 90 | int devices_found = 0; | 91 | int devices_found = 0; |
| @@ -171,7 +172,9 @@ static int physmap_flash_probe(struct platform_device *dev) | |||
| 171 | if (err) | 172 | if (err) |
| 172 | goto err_out; | 173 | goto err_out; |
| 173 | 174 | ||
| 174 | mtd_device_parse_register(info->cmtd, part_probe_types, 0, | 175 | part_types = physmap_data->part_probe_types ? : part_probe_types; |
| 176 | |||
| 177 | mtd_device_parse_register(info->cmtd, part_types, 0, | ||
| 175 | physmap_data->parts, physmap_data->nr_parts); | 178 | physmap_data->parts, physmap_data->nr_parts); |
| 176 | return 0; | 179 | return 0; |
| 177 | 180 | ||
diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h index 04e018160e2b..d2887e76b7f6 100644 --- a/include/linux/mtd/physmap.h +++ b/include/linux/mtd/physmap.h | |||
| @@ -30,6 +30,7 @@ struct physmap_flash_data { | |||
| 30 | unsigned int pfow_base; | 30 | unsigned int pfow_base; |
| 31 | char *probe_type; | 31 | char *probe_type; |
| 32 | struct mtd_partition *parts; | 32 | struct mtd_partition *parts; |
| 33 | const char **part_probe_types; | ||
| 33 | }; | 34 | }; |
| 34 | 35 | ||
| 35 | #endif /* __LINUX_MTD_PHYSMAP__ */ | 36 | #endif /* __LINUX_MTD_PHYSMAP__ */ |
