diff mbox

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

Message ID 1445658891-8096-3-git-send-email-jteki@openedev.com
State Accepted
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Jagan Teki Oct. 24, 2015, 3:54 a.m. UTC
Use direct call to device_remove instead of exctra
spi_flash_remove defination.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jteki@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(-)

Comments

Simon Glass Nov. 5, 2015, 6:25 p.m. UTC | #1
On 23 October 2015 at 21:54, Jagan Teki <jteki@openedev.com> wrote:
> Use direct call to device_remove instead of exctra
> spi_flash_remove defination.
>
> Cc: Simon Glass <sjg@chromium.org>
> Signed-off-by: Jagan Teki <jteki@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(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Jagan Teki Dec. 15, 2015, 6:33 a.m. UTC | #2
On 5 November 2015 at 23:55, Simon Glass <sjg@chromium.org> wrote:
> On 23 October 2015 at 21:54, Jagan Teki <jteki@openedev.com> wrote:
>> Use direct call to device_remove instead of exctra
>> spi_flash_remove defination.
>>
>> Cc: Simon Glass <sjg@chromium.org>
>> Signed-off-by: Jagan Teki <jteki@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(-)
>>
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-spi/master

thanks!
diff mbox

Patch

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)
 {