aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorJonas Gorski <jonas.gorski@gmail.com>2011-12-05 10:08:09 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:16:15 -0500
commit529688fed64a7759323cbd170754c61aad0dd48b (patch)
tree266489686039572f5bfb630d0dbe4c1cc42120df /drivers/mtd/maps
parent70a3c167c4bf38b5ffd07d8506230ecc20ef7ab1 (diff)
mtd: maps: physmap: allow partition parsers for physmap_flash_data
Arch setup code might want to use their own partition parsers, but still use the generic physmap flash driver. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/physmap.c5
1 files changed, 4 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