[PATCH, 2/2] spi: bcm-qspi: Fix return code from bcm_qspi_flash_read()

Kamal Dasu kdasu.kdev at gmail.com
Fri Jan 20 13:50:23 PST 2017


To properly fallback to normal mspi reads return appropriate return code to
m25p80_read() function. Changed return code to -EINVAL from -EAGAIN to match
what is expected by the m25p80 driver.

Signed-off-by: Kamal Dasu <kdasu.kdev at gmail.com>
---
 drivers/spi/spi-bcm-qspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c
index 14f9dea..3e37b6b 100644
--- a/drivers/spi/spi-bcm-qspi.c
+++ b/drivers/spi/spi-bcm-qspi.c
@@ -919,7 +919,7 @@ static int bcm_qspi_flash_read(struct spi_device *spi,
 
 	if (mspi_read)
 		/* this will make the m25p80 read to fallback to mspi read */
-		return -EAGAIN;
+		return -EINVAL;
 
 	io_width = msg->data_nbits ? msg->data_nbits : SPI_NBITS_SINGLE;
 	addrlen = msg->addr_width;
-- 
1.9.1




More information about the linux-mtd mailing list