diff options
author | Chinmay Lonkar <chinmay20220@gmail.com> | 2022-06-28 21:44:04 +0530 |
---|---|---|
committer | Thomas Heijligen <src@posteo.de> | 2022-07-02 14:34:19 +0000 |
commit | 1bb5ddde6048b9819d18082f71640c007c911f2a (patch) | |
tree | d5a74b4fa4f2cdcf22af5b8c8d442231eaf14df4 /ft2232_spi.c | |
parent | f0fae1a9a56349f055c441d1822234590679d95c (diff) | |
download | flashrom-1bb5ddde6048b9819d18082f71640c007c911f2a.tar.gz flashrom-1bb5ddde6048b9819d18082f71640c007c911f2a.tar.bz2 flashrom-1bb5ddde6048b9819d18082f71640c007c911f2a.zip |
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 <chinmay20220@gmail.com>
Change-Id: Id7b9fff4d3e1de22abd31b8123a1d237cd0f5c97
Reviewed-on: https://review.coreboot.org/c/flashrom/+/65521
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Diffstat (limited to 'ft2232_spi.c')
-rw-r--r-- | ft2232_spi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ft2232_spi.c b/ft2232_spi.c index bafed40d5..145a7e00b 100644 --- a/ft2232_spi.c +++ b/ft2232_spi.c @@ -335,7 +335,7 @@ static int ft2232_spi_init(void) struct ftdi_context ftdic; struct ft2232_data *spi_data; - arg = extract_programmer_param("type"); + arg = extract_programmer_param_str("type"); if (arg) { if (!strcasecmp(arg, "2232H")) { ft2232_type = FTDI_FT2232H_PID; @@ -431,7 +431,7 @@ static int ft2232_spi_init(void) /* Remember reserved pins before pindir gets modified. */ const uint8_t rsv_bits = pindir & 0xf0; - arg = extract_programmer_param("port"); + arg = extract_programmer_param_str("port"); if (arg) { switch (toupper((unsigned char)*arg)) { case 'A': @@ -464,7 +464,7 @@ static int ft2232_spi_init(void) } free(arg); - arg = extract_programmer_param("divisor"); + arg = extract_programmer_param_str("divisor"); if (arg && strlen(arg)) { unsigned int temp = 0; char *endptr; @@ -480,7 +480,7 @@ static int ft2232_spi_init(void) free(arg); bool csgpiol_set = false; - arg = extract_programmer_param("csgpiol"); + arg = extract_programmer_param_str("csgpiol"); if (arg) { csgpiol_set = true; msg_pwarn("Deprecation warning: `csgpiol` is deprecated and will be removed " @@ -513,7 +513,7 @@ static int ft2232_spi_init(void) for (int pin = 0; pin < 4; pin++) { char gpiol_param[7]; snprintf(gpiol_param, sizeof(gpiol_param), "gpiol%d", pin); - arg = extract_programmer_param(gpiol_param); + arg = extract_programmer_param_str(gpiol_param); if (!arg) continue; @@ -586,8 +586,8 @@ format_error: msg_perr("Unable to select channel (%s).\n", ftdi_get_error_string(&ftdic)); } - arg = extract_programmer_param("serial"); - arg2 = extract_programmer_param("description"); + arg = extract_programmer_param_str("serial"); + arg2 = extract_programmer_param_str("description"); f = ftdi_usb_open_desc(&ftdic, ft2232_vid, ft2232_type, arg2, arg); |