summaryrefslogtreecommitdiff
path: root/src/soc/intel/broadwell/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/broadwell/spi.c')
-rw-r--r--src/soc/intel/broadwell/spi.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/soc/intel/broadwell/spi.c b/src/soc/intel/broadwell/spi.c
index 6aa7dd33a8..5220970532 100644
--- a/src/soc/intel/broadwell/spi.c
+++ b/src/soc/intel/broadwell/spi.c
@@ -259,20 +259,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)