[coreboot] New patch to review for coreboot: 5056b5b SPI flash layer: remove unused function spi_flash_free()
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Mon Jul 23 23:20:40 CEST 2012
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1273
-gerrit
commit 5056b5bb37bc1b86e901fe5738df27ca568c8cb8
Author: Stefan Reinauer <reinauer at chromium.org>
Date: Wed Jun 6 13:40:12 2012 -0700
SPI flash layer: remove unused function spi_flash_free()
We don't ever free memory in coreboot, hence drop spi_flash_free() and
spi_free_slave()
Change-Id: I0ca3f78574ceb4516e7d33c06ab1a58abfb3b0ec
Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
src/drivers/spi/spi_flash.c | 7 -------
src/include/spi.h | 7 -------
src/include/spi_flash.h | 1 -
src/southbridge/intel/bd82x6x/spi.c | 6 ------
4 files changed, 0 insertions(+), 21 deletions(-)
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index 0b859f3..6cec611 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 bb84258..bee851e 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 2a1dcd4..b84bd96 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 ccc530d..4cd9af0 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.
*
More information about the coreboot
mailing list