Skip to content

Commit f37d135

Browse files
rabaramiquelraynal
authored andcommitted
mtd: rawnand: cadence: fix incorrect device in dma_unmap_single
dma_map_single is using physical/bus device (DMA) but dma_unmap_single is using framework device(NAND controller), which is incorrect. Fixed dma_unmap_single to use correct physical/bus device. Fixes: ec4ba01 ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem") Cc: stable@vger.kernel.org Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@intel.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
1 parent d76d22b commit f37d135

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mtd/nand/raw/cadence-nand-controller.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,12 +1863,12 @@ static int cadence_nand_slave_dma_transfer(struct cdns_nand_ctrl *cdns_ctrl,
18631863
dma_async_issue_pending(cdns_ctrl->dmac);
18641864
wait_for_completion(&finished);
18651865

1866-
dma_unmap_single(cdns_ctrl->dev, buf_dma, len, dir);
1866+
dma_unmap_single(dma_dev->dev, buf_dma, len, dir);
18671867

18681868
return 0;
18691869

18701870
err_unmap:
1871-
dma_unmap_single(cdns_ctrl->dev, buf_dma, len, dir);
1871+
dma_unmap_single(dma_dev->dev, buf_dma, len, dir);
18721872

18731873
err:
18741874
dev_dbg(cdns_ctrl->dev, "Fall back to CPU I/O\n");

0 commit comments

Comments
 (0)