From 45c883260a253ef93f65bc755d5a17467b3da2a3 Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Wed, 8 Feb 2017 10:44:14 -0700 Subject: [PATCH] spi: spi_qsd: Use the right device for dma_unmap_single operation The unmap operation of a dma bounce buffer is performed using an incorrect device compared to the map operation. This leads to a leaked bounce buffer dma map. Fix the device usage during the unmap operation. CRs-Fixed: 1104864 Change-Id: I7da2484ce1f070a4545b9110e3602b4f39d7afdc Signed-off-by: Karthikeyan Ramasubramanian --- drivers/spi/spi_qsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi_qsd.c b/drivers/spi/spi_qsd.c index b81348ceb469..4e1e12969b8d 100644 --- a/drivers/spi/spi_qsd.c +++ b/drivers/spi/spi_qsd.c @@ -1118,7 +1118,7 @@ static void msm_spi_bam_unmap_buffers(struct msm_spi *dd) void *tx_buf, *rx_buf; u32 tx_len, rx_len; - dev = &dd->spi->dev; + dev = dd->dev; xfr = dd->cur_transfer; tx_buf = (void *)xfr->tx_buf;