Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jonas Gorski and committed by
David Woodhouse
529688fe 70a3c167

+5 -1
+4 -1
drivers/mtd/maps/physmap.c
··· 85 85 struct physmap_flash_data *physmap_data; 86 86 struct physmap_flash_info *info; 87 87 const char **probe_type; 88 + const char **part_types; 88 89 int err = 0; 89 90 int i; 90 91 int devices_found = 0; ··· 172 171 if (err) 173 172 goto err_out; 174 173 175 - mtd_device_parse_register(info->cmtd, part_probe_types, 0, 174 + part_types = physmap_data->part_probe_types ? : part_probe_types; 175 + 176 + mtd_device_parse_register(info->cmtd, part_types, 0, 176 177 physmap_data->parts, physmap_data->nr_parts); 177 178 return 0; 178 179
+1
include/linux/mtd/physmap.h
··· 30 30 unsigned int pfow_base; 31 31 char *probe_type; 32 32 struct mtd_partition *parts; 33 + const char **part_probe_types; 33 34 }; 34 35 35 36 #endif /* __LINUX_MTD_PHYSMAP__ */