ar71xx: Add support for AP147-010 reference board
[openwrt/openwrt.git] / target / linux / ar71xx / patches-4.1 / 407-mtd-m25p80-allow-to-pass-probe-types-via-platform-data.patch
1 --- a/drivers/mtd/devices/m25p80.c
2 +++ b/drivers/mtd/devices/m25p80.c
3 @@ -234,7 +234,9 @@ static int m25p_probe(struct spi_device
4
5 ppdata.of_node = spi->dev.of_node;
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 /* we'll likely add more ... use JEDEC IDs, etc */
23 };