From 1233e638336f2d67be57b31bb769aa85aa5bd583 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Fri, 12 Aug 2022 13:37:13 +1000 Subject: tree: Allow passing programmer_cfg directly to programmer Modify the type signature of each programmer entry-point xxx_init() functions to allow for the consumption of the programmer parameterisation string data. ``` $ find -name '*.c' -exec sed -i 's/_init(void)/_init(const char *prog_param)/g' '{}' \; $ find -name '*.c' -exec sed -i 's/get_params(/get_params(const char *prog_param, /g' '{}' \; $ find -name '*.c' -exec sed -i 's/const char \*prog_param)/const struct programmer_cfg *cfg)/g' '{}' \; $ find -name '*.c' -exec sed -i 's/const char \*prog_param,/const struct programmer_cfg *cfg,/g' '{}' \; ``` and manually fix up any remaining parts. Change-Id: I8bab51a635b9d3a43e1619a7a32b334f4ce2cdd2 Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/66655 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk Reviewed-by: Felix Singer --- serprog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'serprog.c') diff --git a/serprog.c b/serprog.c index 44802854..e0258930 100644 --- a/serprog.c +++ b/serprog.c @@ -564,7 +564,7 @@ static const struct par_master par_master_serprog = { static enum chipbustype serprog_buses_supported = BUS_NONE; -static int serprog_init(void) +static int serprog_init(const struct programmer_cfg *cfg) { uint16_t iface; unsigned char pgmname[17]; -- cgit v1.2.3