flashchips: Remove .probe

There's only probe_buses() left. We can even bypass it
by calling chip_on_bus() directly.

Change-Id: I3bca7ad6f264f3b1a4ad887a941605525e432291
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/451
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/flashprog.c b/flashprog.c
index 81fd163..02215a5 100644
--- a/flashprog.c
+++ b/flashprog.c
@@ -705,18 +705,6 @@
 	return !!found_id;
 }
 
-/* wrapper that's used until all probing functions are ported to per-bus probing */
-int probe_buses(struct flashctx *const flash)
-{
-	int i;
-	for (i = 0; i < registered_master_count; ++i) {
-		if (flash->mst.common == &registered_masters[i].common &&
-		    chip_on_bus(&registered_masters[i], flash->chip))
-			return 1;
-	}
-	return 0;
-}
-
 int probe_flash(struct registered_master *mst, int startchip, struct flashctx *flash, int force)
 {
 	const struct flashchip *chip;
@@ -730,10 +718,6 @@
 		if (!buses_common)
 			continue;
 		msg_gdbg("Probing for %s %s, %d kB: ", chip->vendor, chip->name, chip->total_size);
-		if (!chip->probe && !force) {
-			msg_gdbg("failed! flashprog has no probe function for this flash chip.\n");
-			continue;
-		}
 
 		/* Start filling in the dynamic data. */
 		flash->chip = calloc(1, sizeof(*flash->chip));
@@ -757,7 +741,7 @@
 		if (force)
 			break;
 
-		if (flash->chip->probe(flash) != 1)
+		if (!chip_on_bus(mst, flash->chip))
 			goto notfound;
 
 		if (flash->chip->prepare_access && flash->chip->prepare_access(flash, PREPARE_POST_PROBE))