forked from Minki/linux
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>
This commit is contained in:
parent
c9eaa447e7
commit
1676014ef9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user