| From 548735b3ae97333e3630febcf15298304aa42dcf Mon Sep 17 00:00:00 2001 |
| From: Sam Shih <sam.shih@mediatek.com> |
| Date: Fri, 2 Jun 2023 13:06:19 +0800 |
| Subject: [PATCH] |
| [spi-and-storage][999-2364-spi-mediatek-fix-dma-unmap-twice.patch] |
| |
| --- |
| drivers/spi/spi-mt65xx.c | 4 +--- |
| 1 file changed, 1 insertion(+), 3 deletions(-) |
| |
| diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c |
| index 871eff03f..3a8f67f1e 100644 |
| --- a/drivers/spi/spi-mt65xx.c |
| +++ b/drivers/spi/spi-mt65xx.c |
| @@ -947,12 +947,10 @@ static int mtk_spi_mem_exec_op(struct spi_mem *mem, |
| reg_val &= ~SPI_CMD_RX_DMA; |
| writel(reg_val, mdata->base + SPI_CMD_REG); |
| |
| +unmap_rx_dma: |
| if (op->data.dir == SPI_MEM_DATA_IN) |
| dma_unmap_single(mdata->dev, mdata->rx_dma, |
| op->data.nbytes, DMA_FROM_DEVICE); |
| -unmap_rx_dma: |
| - dma_unmap_single(mdata->dev, mdata->rx_dma, |
| - op->data.nbytes, DMA_FROM_DEVICE); |
| unmap_tx_dma: |
| dma_unmap_single(mdata->dev, mdata->tx_dma, |
| tx_size, DMA_TO_DEVICE); |
| -- |
| 2.34.1 |
| |