programmer: Move .max_rom_decode into struct master_common
This is useful information from a chipdriver perspective. It also saves
us the open-coded tracking of the "registered master" in `cli_classic.c`
right away.
Change-Id: I532e9b1802184520852fe0b45650239ea252a60d
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/430
diff --git a/parallel.c b/parallel.c
index 5746862..3e32d59 100644
--- a/parallel.c
+++ b/parallel.c
@@ -84,13 +84,15 @@
return ERROR_FLASHPROG_BUG;
}
- if (max_rom_decode)
- rmst.max_rom_decode = max_rom_decode;
- else
- rmst.max_rom_decode = DEFAULT_MAX_DECODE_PARALLEL;
rmst.buses_supported = buses;
rmst.par = *mst;
if (data)
rmst.par.data = data;
+
+ if (max_rom_decode)
+ rmst.common.max_rom_decode = max_rom_decode;
+ else
+ rmst.common.max_rom_decode = DEFAULT_MAX_DECODE_PARALLEL;
+
return register_master(&rmst);
}