[U-Boot] [PATCH v2 3/3] sf: Remove spi_flash_remove

Jagan Teki jteki at openedev.com
Sat Oct 24 05:54:51 CEST 2015


Use direct call to device_remove instead of exctra
spi_flash_remove defination.

Cc: Simon Glass <sjg at chromium.org>
Signed-off-by: Jagan Teki <jteki at openedev.com>
---
Changes for v2:
	- none

 drivers/mtd/spi/sf-uclass.c | 7 +------
 include/spi_flash.h         | 2 --
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
index a1c5810..60d6cd9 100644
--- a/drivers/mtd/spi/sf-uclass.c
+++ b/drivers/mtd/spi/sf-uclass.c
@@ -29,7 +29,7 @@ int spi_flash_erase_dm(struct udevice *dev, u32 offset, size_t len)
 
 void spi_flash_free(struct spi_flash *flash)
 {
-	spi_flash_remove(flash->spi->dev);
+	device_remove(flash->spi->dev);
 }
 
 static int spi_flash_probe_bus_cs(unsigned int busnum, unsigned int cs,
@@ -77,11 +77,6 @@ struct spi_flash *spi_flash_probe(unsigned int busnum, unsigned int cs,
 	return dev_get_uclass_priv(new);
 }
 
-int spi_flash_remove(struct udevice *dev)
-{
-	return device_remove(dev);
-}
-
 UCLASS_DRIVER(spi_flash) = {
 	.id		= UCLASS_SPI_FLASH,
 	.name		= "spi_flash",
diff --git a/include/spi_flash.h b/include/spi_flash.h
index 0afc9fb..0037f0b 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -154,8 +154,6 @@ int spi_flash_write_dm(struct udevice *dev, u32 offset, size_t len,
  */
 int spi_flash_erase_dm(struct udevice *dev, u32 offset, size_t len);
 
-int spi_flash_remove(struct udevice *flash);
-
 static inline int spi_flash_read(struct spi_flash *flash, u32 offset,
 				 size_t len, void *buf)
 {
-- 
1.9.1



More information about the U-Boot mailing list