1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 14:33:18 +02:00

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>
This commit is contained in:
Nico Huber
2021-05-11 17:38:14 +02:00
parent c117378478
commit 7e4968525d
27 changed files with 33 additions and 31 deletions

View File

@ -572,7 +572,7 @@ int ene_lpc_init()
if (register_shutdown(ene_leave_flash_mode, ctx_data))
goto init_err_cleanup_exit;
register_spi_master(&spi_master_ene);
register_spi_master(&spi_master_ene, NULL);
msg_pdbg("%s: successfully initialized ene\n", __func__);
return 0;