diff options
author | Alexander Goncharov <chat@joursoir.net> | 2023-01-18 17:07:00 +0400 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2023-07-19 02:21:52 +0000 |
commit | 51335a8eb9ffe095df0400dbc99ee4928a70baf5 (patch) | |
tree | fc95c5a171f85bf09d50d34bc3c199dcc1f29ede /mediatek_i2c_spi.c | |
parent | e08899fcf4127de5cb2ad2dd134539d41f7e33b0 (diff) | |
download | flashrom-51335a8eb9ffe095df0400dbc99ee4928a70baf5.tar.gz flashrom-51335a8eb9ffe095df0400dbc99ee4928a70baf5.tar.bz2 flashrom-51335a8eb9ffe095df0400dbc99ee4928a70baf5.zip |
ni845x_spi: pass global state through func params
Instead of relying on global variables, pass and use their value or
pointer to functions where possible.
The usage of `io_voltage_in_mV` global var in `usb8452_spi_set_io_voltage`
function is replaced with existing function argument `set_io_voltage_mV`
since `set_io_voltage_mV` already contains the pointer to global var.
This patch prepares the programmer to move global singleton states into
a struct.
TOPIC=register_master_api
Change-Id: I5daeb0839a4cc18b82d38cc06eeba88a619bec61
Signed-off-by: Alexander Goncharov <chat@joursoir.net>
Ticket: https://ticket.coreboot.org/issues/391
Reviewed-on: https://review.coreboot.org/c/flashrom/+/72154
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'mediatek_i2c_spi.c')
0 files changed, 0 insertions, 0 deletions