From 1e90d9fd3148cebcd6f87cbbaed564b878e2b24a Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Tue, 29 Sep 2015 18:06:04 +0530 Subject: sf: Move read_id code to sf_ops read_id code is related to spi_flash stuff hence moved to sf_ops. Tested-by: Jagan Teki Tested-by: Bin Meng Reviewed-by: Bin Meng Reviewed-by: Simon Glass Signed-off-by: Jagan Teki --- drivers/mtd/spi/sf_probe.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'drivers/mtd/spi/sf_probe.c') diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 994559d548..e35b91760f 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -29,7 +29,6 @@ */ int spi_flash_probe_slave(struct spi_slave *spi, struct spi_flash *flash) { - u8 idcode[5]; int ret; /* Setup spi_slave */ @@ -45,19 +44,7 @@ int spi_flash_probe_slave(struct spi_slave *spi, struct spi_flash *flash) return ret; } - /* Read the ID codes */ - ret = spi_flash_cmd(spi, CMD_READ_ID, idcode, sizeof(idcode)); - if (ret) { - printf("SF: Failed to get idcodes\n"); - goto err_read_id; - } - -#ifdef DEBUG - printf("SF: Got idcodes\n"); - print_buffer(0, idcode, 1, sizeof(idcode), 0); -#endif - - ret = spi_flash_scan(spi, idcode, flash); + ret = spi_flash_scan(spi, flash); if (ret) { ret = -EINVAL; goto err_read_id; -- cgit