1 --- a/drivers/mtd/devices/m25p80.c
2 +++ b/drivers/mtd/devices/m25p80.c
3 @@ -1122,7 +1122,9 @@ static int m25p_probe(struct spi_device
4 /* partitions should match sector boundaries; and it may be good to
5 * use readonly partitions for writeprotected sectors (BP2..BP0).
7 - return mtd_device_parse_register(&flash->mtd, NULL, &ppdata,
8 + return mtd_device_parse_register(&flash->mtd,
9 + data ? data->part_probes : NULL,
11 data ? data->parts : NULL,
12 data ? data->nr_parts : 0);
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;
20 + const char **part_probes;
23 /* we'll likely add more ... use JEDEC IDs, etc */