aboutsummaryrefslogtreecommitdiff
path: root/include/spi_flash.h
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2021-03-10 18:23:57 +0100
committerSimon Glass <sjg@chromium.org>2021-03-27 13:59:36 +1300
commitb09c74f66d46fac7f25e53a0c06f832cf0638a5c (patch)
treebdf953ea708091a606d1198f5de4133b961b4407 /include/spi_flash.h
parent619a81516d3c05a55f0ce5463dd38993c6e9adc2 (diff)
downloadu-boot-b09c74f66d46fac7f25e53a0c06f832cf0638a5c.zip
u-boot-b09c74f66d46fac7f25e53a0c06f832cf0638a5c.tar.gz
u-boot-b09c74f66d46fac7f25e53a0c06f832cf0638a5c.tar.bz2
mtd: spi_flash_free()
dfu_free_entities() invoking dfu_free_entity_sf() has let to segementation faults due to double freeing the same device. spi_flash_free() is not relevant for the driver model but exists only for compatibility with old drivers. We must not remove any device here: * The device may still be referenced. * We don't want to have to probe again. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'include/spi_flash.h')
-rw-r--r--include/spi_flash.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/spi_flash.h b/include/spi_flash.h
index 85cae32..478c543 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -97,7 +97,9 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
unsigned int max_hz, unsigned int spi_mode);
/* Compatibility function - this is the old U-Boot API */
-void spi_flash_free(struct spi_flash *flash);
+static inline 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)