Title: [8170] trunk/drivers/mtd/maps/physmap.c: mtd-physmap: add support users can assign the probe type in board files
Revision
8170
Author
bhsong
Date
2010-01-14 23:13:58 -0500 (Thu, 14 Jan 2010)

Log Message

mtd-physmap: add support users can assign the probe type in board files

good clean-up from Mike

Modified Paths

Diff

Modified: trunk/drivers/mtd/maps/physmap.c (8169 => 8170)


--- trunk/drivers/mtd/maps/physmap.c	2010-01-15 03:30:08 UTC (rev 8169)
+++ trunk/drivers/mtd/maps/physmap.c	2010-01-15 04:13:58 UTC (rev 8170)
@@ -154,12 +154,12 @@
 		simple_map_init(&info->map[i]);
 
 		probe_type = rom_probe_types;
-		for (; info->mtd[i] == NULL && *probe_type != NULL; probe_type++) {
-			if (info->probe_type != NULL)
-				if (strcmp(info->probe_type, *probe_type) != 0)
-					continue;
-			info->mtd[i] = do_map_probe(*probe_type, &info->map[i]);
-		}
+		if (info->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(info->probe_type, &info->map[i]);
+
 		if (info->mtd[i] == NULL) {
 			dev_err(&dev->dev, "map_probe failed\n");
 			err = -ENXIO;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to