From 1bb5ddde6048b9819d18082f71640c007c911f2a Mon Sep 17 00:00:00 2001 From: Chinmay Lonkar Date: Tue, 28 Jun 2022 21:44:04 +0530 Subject: Add `str` extension to extract_programmer_param function name This patch changes the function name of extract_programmer_param() to extract_programmer_param_str() as this function name will clearly specify that it returns the value of the given parameter as a string. Signed-off-by: Chinmay Lonkar Change-Id: Id7b9fff4d3e1de22abd31b8123a1d237cd0f5c97 Reviewed-on: https://review.coreboot.org/c/flashrom/+/65521 Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer Reviewed-by: Thomas Heijligen --- ni845x_spi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ni845x_spi.c') diff --git a/ni845x_spi.c b/ni845x_spi.c index 7c4e4fc2f..30ef61c0e 100644 --- a/ni845x_spi.c +++ b/ni845x_spi.c @@ -552,7 +552,7 @@ static int ni845x_spi_init(void) int32 tmp = 0; // read the cs parameter (which Chip select should we use) - CS_str = extract_programmer_param("cs"); + CS_str = extract_programmer_param_str("cs"); if (CS_str) { CS_number = CS_str[0] - '0'; free(CS_str); @@ -562,7 +562,7 @@ static int ni845x_spi_init(void) } } - voltage = extract_programmer_param("voltage"); + voltage = extract_programmer_param_str("voltage"); if (voltage != NULL) { requested_io_voltage_mV = parse_voltage(voltage); free(voltage); @@ -570,9 +570,9 @@ static int ni845x_spi_init(void) return 1; } - serial_number = extract_programmer_param("serial"); + serial_number = extract_programmer_param_str("serial"); - speed_str = extract_programmer_param("spispeed"); + speed_str = extract_programmer_param_str("spispeed"); if (speed_str) { spi_speed_KHz = strtoul(speed_str, &endptr, 0); if (*endptr) { @@ -585,7 +585,7 @@ static int ni845x_spi_init(void) } ignore_io_voltage_limits = false; - ignore_io_voltage_limits_str = extract_programmer_param("ignore_io_voltage_limits"); + ignore_io_voltage_limits_str = extract_programmer_param_str("ignore_io_voltage_limits"); if (ignore_io_voltage_limits_str && strcmp(ignore_io_voltage_limits_str, "yes") == 0) { ignore_io_voltage_limits = true; -- cgit v1.2.3