diff options
author | Alexander Stein <alexanders83@web.de> | 2014-04-13 12:45:10 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-18 15:41:23 +0100 |
commit | 1676014ef974ce71a854e7f415e2bb52feb24868 (patch) | |
tree | 2c703c33b4fef9bad936e59faf0d501b560d991e /drivers/spi/spi-atmel.c | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) | |
download | linux-1676014ef974ce71a854e7f415e2bb52feb24868.tar.gz linux-1676014ef974ce71a854e7f415e2bb52feb24868.tar.bz2 linux-1676014ef974ce71a854e7f415e2bb52feb24868.zip |
spi: atmel: Fix scheduling while atomic bug
atmel_spi_lock does a spin_lock_irqsave, so we need to renable the
interrupts when we want to schedule.
Signed-off-by: Alexander Stein <alexanders83@web.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-atmel.c')
-rw-r--r-- | drivers/spi/spi-atmel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 8005f9869481..079e6b1b0cdb 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1115,8 +1115,11 @@ static int atmel_spi_one_transfer(struct spi_master *master, atmel_spi_next_xfer_pio(master, xfer); } + /* interrupts are disabled, so free the lock for schedule */ + atmel_spi_unlock(as); ret = wait_for_completion_timeout(&as->xfer_completion, SPI_DMA_TIMEOUT); + atmel_spi_lock(as); if (WARN_ON(ret == 0)) { dev_err(&spi->dev, "spi trasfer timeout, err %d\n", ret); |