summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/spi/spi_flash.c7
-rw-r--r--src/include/spi.h7
-rw-r--r--src/include/spi_flash.h1
-rw-r--r--src/southbridge/intel/bd82x6x/spi.c6
4 files changed, 0 insertions, 21 deletions
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index 0b859f337c..6cec611504 100644
--- a/src/drivers/spi/spi_flash.c
+++ b/src/drivers/spi/spi_flash.c
@@ -297,12 +297,5 @@ err_manufacturer_probe:
err_read_id:
spi_release_bus(spi);
err_claim_bus:
- spi_free_slave(spi);
return NULL;
}
-
-void spi_flash_free(struct spi_flash *flash)
-{
- spi_free_slave(flash->spi);
- free(flash);
-}
diff --git a/src/include/spi.h b/src/include/spi.h
index bb84258137..bee851ea97 100644
--- a/src/include/spi.h
+++ b/src/include/spi.h
@@ -84,13 +84,6 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
unsigned int max_hz, unsigned int mode);
/*-----------------------------------------------------------------------
- * Free any memory associated with a SPI slave.
- *
- * slave: The SPI slave
- */
-void spi_free_slave(struct spi_slave *slave);
-
-/*-----------------------------------------------------------------------
* Claim the bus and prepare it for communication with a given slave.
*
* This must be called before doing any transfers with a SPI slave. It
diff --git a/src/include/spi_flash.h b/src/include/spi_flash.h
index 2a1dcd4632..b84bd96fc6 100644
--- a/src/include/spi_flash.h
+++ b/src/include/spi_flash.h
@@ -68,7 +68,6 @@ struct spi_flash {
struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
unsigned int max_hz, unsigned int spi_mode);
-void spi_flash_free(struct spi_flash *flash);
static inline int spi_flash_read(struct spi_flash *flash, u32 offset,
size_t len, void *buf)
diff --git a/src/southbridge/intel/bd82x6x/spi.c b/src/southbridge/intel/bd82x6x/spi.c
index ccc530d884..4cd9af037c 100644
--- a/src/southbridge/intel/bd82x6x/spi.c
+++ b/src/southbridge/intel/bd82x6x/spi.c
@@ -280,12 +280,6 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
return slave;
}
-void spi_free_slave(struct spi_slave *_slave)
-{
- ich_spi_slave *slave = (ich_spi_slave *)_slave;
- free(slave);
-}
-
/*
* Check if this device ID matches one of supported Intel PCH devices.
*