summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorMaxime Chevallier <maxime.chevallier@smile.fr>2017-10-10 10:43:17 +0200
committerMark Brown <broonie@kernel.org>2017-10-10 11:14:32 +0200
commit5a866ec0014b2baa4ecbb1eaa19c835482829d08 (patch)
treef9c290d36587220a2c4c263014e74a3d2b110c8f /drivers/spi
parentspi: armada-3700: Fix padding when sending not 4-byte aligned data (diff)
downloadlinux-5a866ec0014b2baa4ecbb1eaa19c835482829d08.tar.xz
linux-5a866ec0014b2baa4ecbb1eaa19c835482829d08.zip
spi: a3700: Return correct value on timeout detection
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> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/spi')
-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 9172cb2d2e7a..568e1c65aa82 100644
--- a/drivers/spi/spi-armada-3700.c
+++ b/drivers/spi/spi-armada-3700.c
@@ -387,7 +387,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,