提交 529688fe 编写于 作者: J Jonas Gorski 提交者: David Woodhouse

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: NJonas Gorski <jonas.gorski@gmail.com>
Acked-by: NFlorian Fainelli <florian@openwrt.org>
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 70a3c167
......@@ -85,6 +85,7 @@ static int physmap_flash_probe(struct platform_device *dev)
struct physmap_flash_data *physmap_data;
struct physmap_flash_info *info;
const char **probe_type;
const char **part_types;
int err = 0;
int i;
int devices_found = 0;
......@@ -171,7 +172,9 @@ static int physmap_flash_probe(struct platform_device *dev)
if (err)
goto err_out;
mtd_device_parse_register(info->cmtd, part_probe_types, 0,
part_types = physmap_data->part_probe_types ? : part_probe_types;
mtd_device_parse_register(info->cmtd, part_types, 0,
physmap_data->parts, physmap_data->nr_parts);
return 0;
......
......@@ -30,6 +30,7 @@ struct physmap_flash_data {
unsigned int pfow_base;
char *probe_type;
struct mtd_partition *parts;
const char **part_probe_types;
};
#endif /* __LINUX_MTD_PHYSMAP__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册