Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Chevallier <maxime.chevallier@smile.fr>2017-10-10 10:43:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-02 09:54:46 +0100
commitccecf863c130fbeaffa2657e4ac56e7f64aa4097 (patch)
tree15bb51b1104038e7cf24f3cb7d727a9a9fcdd72f
parent5388b44287b63629b894053e2cd306e361d134d7 (diff)
spi: a3700: Return correct value on timeout detection
commit 5a866ec0014b2baa4ecbb1eaa19c835482829d08 upstream. When waiting for transfer completion, a3700_spi_wait_completion returns a boolean indicating if a timeout occurred. The function was returning 'true' everytime, failing to detect any timeout. This patch makes it return 'false' when a timeout is reached. Signed-off-by: Maxime Chevallier <maxime.chevallier@smile.fr> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/spi/spi-armada-3700.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-armada-3700.c b/drivers/spi/spi-armada-3700.c
index 6c7d7a460689..bd822c32ae3b 100644
--- a/drivers/spi/spi-armada-3700.c
+++ b/drivers/spi/spi-armada-3700.c
@@ -392,7 +392,8 @@ static bool a3700_spi_wait_completion(struct spi_device *spi)
spireg_write(a3700_spi, A3700_SPI_INT_MASK_REG, 0);
- return true;
+ /* Timeout was reached */
+ return false;
}
static bool a3700_spi_transfer_wait(struct spi_device *spi,