diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2021-03-10 20:23:57 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-03-27 03:59:36 +0300 |
commit | b09c74f66d46fac7f25e53a0c06f832cf0638a5c (patch) | |
tree | bdf953ea708091a606d1198f5de4133b961b4407 /drivers/mtd | |
parent | 619a81516d3c05a55f0ce5463dd38993c6e9adc2 (diff) | |
download | u-boot-b09c74f66d46fac7f25e53a0c06f832cf0638a5c.tar.xz |
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 'drivers/mtd')
-rw-r--r-- | drivers/mtd/spi/sf-uclass.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c index 12d132152d..fd1bec80d6 100644 --- a/drivers/mtd/spi/sf-uclass.c +++ b/drivers/mtd/spi/sf-uclass.c @@ -46,11 +46,6 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs, return dev_get_uclass_priv(dev); } -void spi_flash_free(struct spi_flash *flash) -{ - device_remove(flash->spi->dev, DM_REMOVE_NORMAL); -} - int spi_flash_probe_bus_cs(unsigned int busnum, unsigned int cs, unsigned int max_hz, unsigned int spi_mode, struct udevice **devp) |