| 1 | --- a/drivers/mtd/devices/m25p80.c |
| 2 | +++ b/drivers/mtd/devices/m25p80.c |
| 3 | @@ -1016,7 +1016,9 @@ static int __devinit m25p_probe(struct s |
| 4 | /* partitions should match sector boundaries; and it may be good to |
| 5 | * use readonly partitions for writeprotected sectors (BP2..BP0). |
| 6 | */ |
| 7 | - return mtd_device_parse_register(&flash->mtd, NULL, &ppdata, |
| 8 | + return mtd_device_parse_register(&flash->mtd, |
| 9 | + data ? data->part_probes : NULL, |
| 10 | + &ppdata, |
| 11 | data ? data->parts : NULL, |
| 12 | data ? data->nr_parts : 0); |
| 13 | } |
| 14 | --- a/include/linux/spi/flash.h |
| 15 | +++ b/include/linux/spi/flash.h |
| 16 | @@ -24,6 +24,7 @@ struct flash_platform_data { |
| 17 | unsigned int nr_parts; |
| 18 | |
| 19 | char *type; |
| 20 | + const char **part_probes; |
| 21 | |
| 22 | size_t max_read_len; |
| 23 | /* we'll likely add more ... use JEDEC IDs, etc */ |
| 24 | |