Attention is currently required from: Peter Marheine.
Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/67897 )
Change subject: realtek_mst_i2c_spi.c: Move variable enter_isp into parameter struct ......................................................................
realtek_mst_i2c_spi.c: Move variable enter_isp into parameter struct
Signed-off-by: Felix Singer felixsinger@posteo.net Change-Id: If95160c68b2dea40fb31abf68a430be5d20c4cf1 --- M realtek_mst_i2c_spi.c 1 file changed, 17 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/97/67897/1
diff --git a/realtek_mst_i2c_spi.c b/realtek_mst_i2c_spi.c index 1863e9b..db999d4 100644 --- a/realtek_mst_i2c_spi.c +++ b/realtek_mst_i2c_spi.c @@ -56,6 +56,7 @@
struct realtek_mst_i2c_spi_parameters { bool allow_brick; + bool enter_isp; bool reset; };
@@ -449,7 +450,7 @@ .probe_opcode = default_spi_probe_opcode, };
-static int get_params(const struct programmer_cfg *cfg, bool *enter_isp, struct realtek_mst_i2c_spi_parameters *parameters) +static int get_params(const struct programmer_cfg *cfg, struct realtek_mst_i2c_spi_parameters *parameters) { char *param_str; int ret = 0; @@ -480,13 +481,13 @@ } free(param_str);
- *enter_isp = true; /* Default behaviour is enter ISP on setup. */ + parameters->enter_isp = true; /* Default behaviour is enter ISP on setup. */ param_str = extract_programmer_param_str(cfg, "enter_isp"); if (param_str) { if (param_str[0] == '1') { - *enter_isp = true; + parameters->enter_isp = true; } else if (param_str[0] == '0') { - *enter_isp = false; + parameters->enter_isp = false; } else { msg_perr("%s: Incorrect param format, enter_isp=1 or 0.\n", __func__); ret = SPI_GENERIC_ERROR; @@ -500,10 +501,9 @@ static int realtek_mst_i2c_spi_init(const struct programmer_cfg *cfg) { int ret = 0; - bool enter_isp; struct realtek_mst_i2c_spi_parameters parameters = { 0 };
- if (get_params(cfg, &enter_isp, ¶meters)) + if (get_params(cfg, ¶meters)) return SPI_GENERIC_ERROR;
/* @@ -522,7 +522,7 @@ if (fd < 0) return fd;
- if (enter_isp) { + if (parameters.enter_isp) { ret |= realtek_mst_i2c_spi_enter_isp_mode(fd); if (ret) return ret;