spi: stm32: fix DMA configuration with only one channel
authorCezary Gapinski <cezary.gapinski@gmail.com>
Mon, 24 Dec 2018 22:00:29 +0000 (23:00 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 7 Jan 2019 18:23:56 +0000 (18:23 +0000)
commit2cbee7f886b2ab6b723745b295379ec6475f2ee3
tree2fb9a964a80a2d30690b35298aaa5335fe4aae87
parentd4c9134a6c2c85d18b0d58accdf0e9be447f77a3
spi: stm32: fix DMA configuration with only one channel

When SPI driver is configured to work only with TX or RX DMA channel
then dmaengine functions can dereferene NULL pointer.

Running full-duplex mode when when only RX or TX DMA channel is
available can cause overrun condition or incorrect writing to transmit
buffer so disable this types of DMA configuration and go back to
interrupt mode.

Signed-off-by: Cezary Gapinski <cezary.gapinski@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32.c