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: ec4ba01e89
("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>
This commit is contained in:
parent
d76d22b509
commit
f37d135b42
1 changed files with 2 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue