From 366bd594e36fc3dbcc17dc56ff5096a8b5abd50c Mon Sep 17 00:00:00 2001 From: Barry Song <21cnbao@gmail.com> Date: Fri, 15 Jan 2010 15:50:14 +0800 Subject: [PATCH] --- yaml --- r: 207817 b: refs/heads/master c: 78ef7fab0eb0a5b159842bac89aed74bb0aa7bfe h: refs/heads/master i: 207815: 88a7521d5ad7d7fb41a1b1009074920c779dc8c9 v: v3 --- [refs] | 2 +- trunk/drivers/mtd/maps/physmap.c | 8 ++++++-- trunk/include/linux/mtd/physmap.h | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 60755e704dfc..7813d868ce73 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 73ee5760253dc8893502e19a9cb118d25dab21ec +refs/heads/master: 78ef7fab0eb0a5b159842bac89aed74bb0aa7bfe diff --git a/trunk/drivers/mtd/maps/physmap.c b/trunk/drivers/mtd/maps/physmap.c index 829aa4bee54f..4c18b98a3110 100644 --- a/trunk/drivers/mtd/maps/physmap.c +++ b/trunk/drivers/mtd/maps/physmap.c @@ -136,8 +136,12 @@ static int physmap_flash_probe(struct platform_device *dev) simple_map_init(&info->map[i]); probe_type = rom_probe_types; - for (; info->mtd[i] == NULL && *probe_type != NULL; probe_type++) - info->mtd[i] = do_map_probe(*probe_type, &info->map[i]); + if (physmap_data->probe_type == NULL) { + for (; info->mtd[i] == NULL && *probe_type != NULL; probe_type++) + info->mtd[i] = do_map_probe(*probe_type, &info->map[i]); + } else + info->mtd[i] = do_map_probe(physmap_data->probe_type, &info->map[i]); + if (info->mtd[i] == NULL) { dev_err(&dev->dev, "map_probe failed\n"); err = -ENXIO; diff --git a/trunk/include/linux/mtd/physmap.h b/trunk/include/linux/mtd/physmap.h index 76f7cabf07d3..bcfd9f777454 100644 --- a/trunk/include/linux/mtd/physmap.h +++ b/trunk/include/linux/mtd/physmap.h @@ -25,6 +25,7 @@ struct physmap_flash_data { void (*set_vpp)(struct map_info *, int); unsigned int nr_parts; unsigned int pfow_base; + char *probe_type; struct mtd_partition *parts; };