--- zzzz-none-000/linux-2.6.28.10/drivers/mtd/maps/physmap.c 2009-05-02 18:54:43.000000000 +0000 +++ puma5-6360-529/linux-2.6.28.10/drivers/mtd/maps/physmap.c 2010-04-07 09:56:53.000000000 +0000 @@ -86,11 +86,11 @@ int err = 0; int i; int devices_found = 0; - physmap_data = dev->dev.platform_data; if (physmap_data == NULL) return -ENODEV; + printk("[%s] line=%d, doing probes\n" ,__FUNCTION__, __LINE__); info = devm_kzalloc(&dev->dev, sizeof(struct physmap_flash_info), GFP_KERNEL); if (info == NULL) { @@ -133,6 +133,7 @@ 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 (info->mtd[i] == NULL) { dev_err(&dev->dev, "map_probe failed\n"); err = -ENXIO; @@ -165,10 +166,21 @@ #ifdef CONFIG_MTD_PARTITIONS err = parse_mtd_partitions(info->cmtd, part_probe_types, &info->parts, 0); if (err > 0) { + printk("[%s] line=%d, err=%d \n" ,__FUNCTION__, __LINE__, err); + add_mtd_partitions(info->cmtd, info->parts, err); return 0; } - + + if (physmap_data->probes) { + /*--- printk("[%s] line=%d, doing individual probes\n" ,__FUNCTION__, __LINE__); ---*/ + err = parse_mtd_partitions(info->cmtd, physmap_data->probes, &info->parts, 0); + /*--- printk("[%s] line=%d, doing individual probes\n" ,__FUNCTION__, __LINE__); ---*/ + if (err > 0) { + add_mtd_partitions(info->cmtd, info->parts, err); + return 0; + } + } if (physmap_data->nr_parts) { printk(KERN_NOTICE "Using physmap partition information\n"); add_mtd_partitions(info->cmtd, physmap_data->parts,