UPSTREAM: ft2232_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".
BUG=b:185191942
TEST=emerge-samus flashrom
BRANCH=none
Original-Change-Id: I67518a58b4f35e0edaf06ac09c9374bdf06db0df
Original-Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/52256
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Original-Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
(cherry picked from commit 9dad8c2143e6054b7c198aab5f622318a61bede4)
Change-Id: I7b5bd9cb43f1fe22154375db59f971f2f64f71d7
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/2839683
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
1 file changed