diff options
author | Nico Huber <nico.h@gmx.de> | 2021-05-11 17:38:14 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-05-13 14:37:29 +0000 |
commit | 7e4968525d37d87e8b6f8b848e4f2f9696926237 (patch) | |
tree | cefab4e871fc4e32e15772e131942c8fa5712a13 /lspcon_i2c_spi.c | |
parent | c1173784781d81c5d601a65fbfc61d550d50f377 (diff) | |
download | flashrom-7e4968525d37d87e8b6f8b848e4f2f9696926237.tar.gz flashrom-7e4968525d37d87e8b6f8b848e4f2f9696926237.tar.bz2 flashrom-7e4968525d37d87e8b6f8b848e4f2f9696926237.zip |
programmer: Smoothen register_spi_master() API
It was impossible to register a const struct spi_master that would
point to dynamically allocated `data`. Fix that so that we won't
have to create more mutable globals.
Change-Id: I0c753b3db050fb87d4bbe2301a7ead854f28456f
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/54066
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'lspcon_i2c_spi.c')
-rw-r--r-- | lspcon_i2c_spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lspcon_i2c_spi.c b/lspcon_i2c_spi.c index 096fb762..6b8dfe66 100644 --- a/lspcon_i2c_spi.c +++ b/lspcon_i2c_spi.c @@ -457,7 +457,7 @@ int lspcon_i2c_spi_init(void) spi_master_i2c_lspcon.data = data; ret |= register_shutdown(lspcon_i2c_spi_shutdown, data); - ret |= register_spi_master(&spi_master_i2c_lspcon); + ret |= register_spi_master(&spi_master_i2c_lspcon, NULL); return ret; } |