[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250108135234.3107502-4-niravkumar.l.rabara@intel.com>
Date: Wed, 8 Jan 2025 21:52:34 +0800
From: niravkumar.l.rabara@...el.com
To: Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Niravkumar L Rabara <niravkumar.l.rabara@...el.com>,
linux@...blig.org,
Shen Lichuan <shenlichuan@...o.com>,
Jinjie Ruan <ruanjinjie@...wei.com>,
u.kleine-koenig@...libre.com,
linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] mtd: rawnand: cadence: fix incorrect dev context in dma_unmap_single
From: Niravkumar L Rabara <niravkumar.l.rabara@...el.com>
dma_map_single is using dma_dev->dev, however dma_unmap_single
is using cdns_ctrl->dev, which is incorrect.
Used the correct device context dma_dev->dev for dma_unmap_single.
Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@...el.com>
---
drivers/mtd/nand/raw/cadence-nand-controller.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c
index 8281151cf869..2d50eeb902ac 100644
--- a/drivers/mtd/nand/raw/cadence-nand-controller.c
+++ b/drivers/mtd/nand/raw/cadence-nand-controller.c
@@ -1863,12 +1863,12 @@ static int cadence_nand_slave_dma_transfer(struct cdns_nand_ctrl *cdns_ctrl,
dma_async_issue_pending(cdns_ctrl->dmac);
wait_for_completion(&finished);
- dma_unmap_single(cdns_ctrl->dev, buf_dma, len, dir);
+ dma_unmap_single(dma_dev->dev, buf_dma, len, dir);
return 0;
err_unmap:
- dma_unmap_single(cdns_ctrl->dev, buf_dma, len, dir);
+ dma_unmap_single(dma_dev->dev, buf_dma, len, dir);
err:
dev_dbg(cdns_ctrl->dev, "Fall back to CPU I/O\n");
--
2.25.1
Powered by blists - more mailing lists