diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2021-05-11 11:27:55 +1000 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-05-12 23:26:00 +0000 |
commit | e1e9e2b4ee057b356bb038ea8c3cb7cbe9a1db09 (patch) | |
tree | 6d2db7c68307a3882c0752c75b8fe64bbe05d575 /satasii.c | |
parent | 2348b18a5e926da5226bedd37ac4e69dee7543ac (diff) | |
download | flashrom-e1e9e2b4ee057b356bb038ea8c3cb7cbe9a1db09.tar.gz flashrom-e1e9e2b4ee057b356bb038ea8c3cb7cbe9a1db09.tar.bz2 flashrom-e1e9e2b4ee057b356bb038ea8c3cb7cbe9a1db09.zip |
usbblaster_spi.c: Refactor singleton states into reentrant pattern
Move global singleton states into a struct and store within
the spi_master data field for the life-time of the driver.
This is one of the steps on the way to move spi_master data
memory management behind the initialisation API, for more
context see other patches under the same topic "register_master_api".
This patch also introduces shutdown function for usbblaster, because
there was none previously and without shutdown function there is no
way to free spi_master data at the end of driver lifecycle.
BUG=b:185191942
TEST=builds
Change-Id: Ia81f9f40c7eab430a8b304d0b197ce7c75bf5ace
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/54044
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'satasii.c')
0 files changed, 0 insertions, 0 deletions