]> git.baikalelectronics.ru Git - kernel.git/commit
spi: atmel: fixed spin_lock usage inside atmel_spi_remove
authorRadu Pirea <radu.pirea@microchip.com>
Fri, 15 Dec 2017 15:40:17 +0000 (17:40 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 19 Dec 2017 09:35:35 +0000 (09:35 +0000)
commit09110c5f0f0b39c3a2e78dc0d36eb706c11c622b
treeb24e6cba0fb30059102ea9d7b79ec8af8bacd0c2
parentf9e9d4ede33f20ad238fc11db0232eaede684940
spi: atmel: fixed spin_lock usage inside atmel_spi_remove

The only part of atmel_spi_remove which needs to be atomic is hardware
reset.

atmel_spi_stop_dma calls dma_terminate_all and this needs interrupts
enabled.
atmel_spi_release_dma calls dma_release_channel and dma_release_channel
locks a mutex inside of spin_lock.

So the call of these functions can't be inside a spin_lock.

Reported-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Radu Pirea <radu.pirea@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-atmel.c