From: Mark Brown Date: Mon, 9 Mar 2015 18:11:06 +0000 (+0000) Subject: Merge branch 'fix/dw' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0365fbd4bbc0b8f3fd3c78c16a8020ea83b3afcf;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Merge branch 'fix/dw' of git://git./linux/kernel/git/broonie/spi into spi-dw --- 0365fbd4bbc0b8f3fd3c78c16a8020ea83b3afcf diff --cc drivers/spi/spi-dw-mid.c index 8f68e8277a3b,4f8c798e0633..c8416ef01f9a --- a/drivers/spi/spi-dw-mid.c +++ b/drivers/spi/spi-dw-mid.c @@@ -108,9 -108,10 +108,10 @@@ static void dw_spi_dma_tx_done(void *ar { struct dw_spi *dws = arg; - if (test_and_clear_bit(TX_BUSY, &dws->dma_chan_busy) & BIT(RX_BUSY)) + clear_bit(TX_BUSY, &dws->dma_chan_busy); + if (test_bit(RX_BUSY, &dws->dma_chan_busy)) return; - dw_spi_xfer_done(dws); + spi_finalize_current_transfer(dws->master); } static struct dma_async_tx_descriptor *dw_spi_dma_prepare_tx(struct dw_spi *dws) @@@ -153,9 -157,10 +157,10 @@@ static void dw_spi_dma_rx_done(void *ar { struct dw_spi *dws = arg; - if (test_and_clear_bit(RX_BUSY, &dws->dma_chan_busy) & BIT(TX_BUSY)) + clear_bit(RX_BUSY, &dws->dma_chan_busy); + if (test_bit(TX_BUSY, &dws->dma_chan_busy)) return; - dw_spi_xfer_done(dws); + spi_finalize_current_transfer(dws->master); } static struct dma_async_tx_descriptor *dw_spi_dma_prepare_rx(struct dw_spi *dws)