]> git.baikalelectronics.ru Git - kernel.git/commit
spi: bcm2835: Tear down DMA before turning off SPI controller
authorLukas Wunner <lukas@wunner.de>
Fri, 15 May 2020 15:58:04 +0000 (17:58 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 20 May 2020 17:16:41 +0000 (18:16 +0100)
commit152620973afde19eb26458c288fc8e7f3b2954b6
treea39dcf0c9f6eff31ee376e48e0dbedc45e833699
parentf83ef18e0d8789b7fea6f203e4fd34f707ad16a4
spi: bcm2835: Tear down DMA before turning off SPI controller

On unbind of the BCM2835 SPI driver, the SPI controller is disabled
first and the DMA channels are terminated and torn down afterwards.

This seems backwards:  In the theoretical case that DMA is active,
it might try to fill the SPI FIFOs even after the controller has
been disabled.

Reverse the order, thereby mirroring what's done on ->probe().

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/ac79f1e3d6fd9a1f5e0cb4008c43b98ea70be3c2.1589557526.git.lukas@wunner.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-bcm2835.c