Message ID | 1445658891-8096-3-git-send-email-jteki@openedev.com |
---|---|
State | Accepted |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show |
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>
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 --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) {
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(-)