diff options
Diffstat (limited to 'src/southbridge/intel/common/spi.c')
-rw-r--r-- | src/southbridge/intel/common/spi.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/southbridge/intel/common/spi.c b/src/southbridge/intel/common/spi.c index 2d36d38354..7e0cc201c7 100644 --- a/src/southbridge/intel/common/spi.c +++ b/src/southbridge/intel/common/spi.c @@ -285,20 +285,11 @@ static void ich_set_bbar(uint32_t minaddr) writel_(ichspi_bbar, cntlr.bbar); } -struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs) +int spi_setup_slave(unsigned int bus, unsigned int cs, struct spi_slave *slave) { - ich_spi_slave *slave = malloc(sizeof(*slave)); - - if (!slave) { - printk(BIOS_DEBUG, "ICH SPI: Bad allocation\n"); - return NULL; - } - - memset(slave, 0, sizeof(*slave)); - slave->bus = bus; slave->cs = cs; - return slave; + return 0; } void spi_init(void) |