| 1 | From 266c506f4b262bd6aba0776a03d82c98e65d9906 Mon Sep 17 00:00:00 2001 |
| 2 | From: Jonas Gorski <jonas.gorski@gmail.com> |
| 3 | Date: Tue, 1 May 2012 17:32:36 +0200 |
| 4 | Subject: [PATCH 63/79] MTD: physmap: allow passing pp_data |
| 5 | |
| 6 | --- |
| 7 | drivers/mtd/maps/physmap.c | 4 +++- |
| 8 | include/linux/mtd/physmap.h | 1 + |
| 9 | 2 files changed, 4 insertions(+), 1 deletion(-) |
| 10 | |
| 11 | --- a/drivers/mtd/maps/physmap.c |
| 12 | +++ b/drivers/mtd/maps/physmap.c |
| 13 | @@ -84,6 +84,7 @@ static int physmap_flash_probe(struct pl |
| 14 | { |
| 15 | struct physmap_flash_data *physmap_data; |
| 16 | struct physmap_flash_info *info; |
| 17 | + struct mtd_part_parser_data *pp_data; |
| 18 | const char **probe_type; |
| 19 | const char **part_types; |
| 20 | int err = 0; |
| 21 | @@ -173,8 +174,9 @@ static int physmap_flash_probe(struct pl |
| 22 | goto err_out; |
| 23 | |
| 24 | part_types = physmap_data->part_probe_types ? : part_probe_types; |
| 25 | + pp_data = physmap_data->pp_data ? physmap_data->pp_data : NULL; |
| 26 | |
| 27 | - mtd_device_parse_register(info->cmtd, part_types, 0, |
| 28 | + mtd_device_parse_register(info->cmtd, part_types, pp_data, |
| 29 | physmap_data->parts, physmap_data->nr_parts); |
| 30 | return 0; |
| 31 | |
| 32 | --- a/include/linux/mtd/physmap.h |
| 33 | +++ b/include/linux/mtd/physmap.h |
| 34 | @@ -32,6 +32,7 @@ struct physmap_flash_data { |
| 35 | char *probe_type; |
| 36 | struct mtd_partition *parts; |
| 37 | const char **part_probe_types; |
| 38 | + struct mtd_part_parser_data *pp_data; |
| 39 | }; |
| 40 | |
| 41 | #endif /* __LINUX_MTD_PHYSMAP__ */ |
| 42 | |