mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +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:
@ -786,11 +786,11 @@ int sb600_probe_spi(struct pci_dev *dev)
|
||||
|
||||
/* Starting with Yangtze the SPI controller got a different interface with a much bigger buffer. */
|
||||
if (amd_gen < CHIPSET_YANGTZE)
|
||||
register_spi_master(&spi_master_sb600);
|
||||
register_spi_master(&spi_master_sb600, NULL);
|
||||
else if (amd_gen == CHIPSET_YANGTZE)
|
||||
register_spi_master(&spi_master_yangtze);
|
||||
register_spi_master(&spi_master_yangtze, NULL);
|
||||
else
|
||||
register_spi_master(&spi_master_promontory);
|
||||
register_spi_master(&spi_master_promontory, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user