mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
spi: rockchip: init rxconf and txconf to 0
Dmac pl330 adds src_interlace_size of dma_slave_config rxconf.
If rxconf is local variable, src_interlace_size may be non zero,
which causes wrong process.
Fixes: ddd2e87ad4 ("dmaengine: pl330: add support for interlace size config")
Change-Id: Ib301c7ca4a1175bafd0631cb4deea4baa60eebc7
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
This commit is contained in:
@@ -450,6 +450,9 @@ static int rockchip_spi_prepare_dma(struct rockchip_spi *rs)
|
||||
struct dma_slave_config rxconf, txconf;
|
||||
struct dma_async_tx_descriptor *rxdesc, *txdesc;
|
||||
|
||||
memset(&rxconf, 0, sizeof(struct dma_slave_config));
|
||||
memset(&txconf, 0, sizeof(struct dma_slave_config));
|
||||
|
||||
spin_lock_irqsave(&rs->lock, flags);
|
||||
rs->state &= ~RXBUSY;
|
||||
rs->state &= ~TXBUSY;
|
||||
|
||||
Reference in New Issue
Block a user