From 5c710ea54afabf8c0e5f3c8ada45c4a5f9f0781b Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Fri, 12 Aug 2022 13:47:29 +1000 Subject: tree: Port programmers to pass programmer_cfg to extractors Ran; ``` $ find -name '*.c' -exec sed -i 's/extract_programmer_param_str(NULL/extract_programmer_param_str(cfg/g' '{}' \; ``` Manually fix i2c_helper_linux.c and other cases after. Treat cases of; - pcidev.c , and - usb_device.c as exceptional to be dealt with in later patches. Change-Id: If7b7987e803d35582dda219652a6fc3ed5729b47 Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/66656 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk Reviewed-by: Felix Singer --- pony_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pony_spi.c') diff --git a/pony_spi.c b/pony_spi.c index 69be3aa0..04c3236e 100644 --- a/pony_spi.c +++ b/pony_spi.c @@ -130,7 +130,7 @@ static int get_params(const struct programmer_cfg *cfg, enum pony_type *type, in *have_device = 0; /* The parameter is in format "dev=/dev/device,type=serbang" */ - arg = extract_programmer_param_str(NULL, "dev"); + arg = extract_programmer_param_str(cfg, "dev"); if (arg && strlen(arg)) { sp_fd = sp_openserport(arg, 9600); if (sp_fd == SER_INV_FD) @@ -140,7 +140,7 @@ static int get_params(const struct programmer_cfg *cfg, enum pony_type *type, in } free(arg); - arg = extract_programmer_param_str(NULL, "type"); + arg = extract_programmer_param_str(cfg, "type"); if (arg && !strcasecmp(arg, "serbang")) { *type = TYPE_SERBANG; } else if (arg && !strcasecmp(arg, "si_prog")) { -- cgit v1.2.3