diff options
author | Christoph Hellwig <hch@lst.de> | 2018-12-21 14:56:38 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-04-08 17:52:45 +0200 |
commit | 5ab6a91a1cacd827382897a80425df8a2d27744a (patch) | |
tree | d51221b13cad9ddc44b4d56ab1d50299b00e9723 /arch/arm/mach-rpc | |
parent | 02c486f483434286bbc775d160fa901fdb4f9ff6 (diff) | |
download | linux-5ab6a91a1cacd827382897a80425df8a2d27744a.tar.bz2 |
arm: use a dummy struct device for ISA DMA use of the DMA API
This gets rid of the last NULL dev argument passed to the DMA API.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'arch/arm/mach-rpc')
-rw-r--r-- | arch/arm/mach-rpc/dma.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-rpc/dma.c b/arch/arm/mach-rpc/dma.c index fb48f3141fb4..f2703ca17954 100644 --- a/arch/arm/mach-rpc/dma.c +++ b/arch/arm/mach-rpc/dma.c @@ -151,6 +151,12 @@ static void iomd_free_dma(unsigned int chan, dma_t *dma) free_irq(idma->irq, idma); } +static struct device isa_dma_dev = { + .init_name = "fallback device", + .coherent_dma_mask = ~(dma_addr_t)0, + .dma_mask = &isa_dma_dev.coherent_dma_mask, +}; + static void iomd_enable_dma(unsigned int chan, dma_t *dma) { struct iomd_dma *idma = container_of(dma, struct iomd_dma, dma); @@ -168,7 +174,7 @@ static void iomd_enable_dma(unsigned int chan, dma_t *dma) idma->dma.sg = &idma->dma.buf; idma->dma.sgcount = 1; idma->dma.buf.length = idma->dma.count; - idma->dma.buf.dma_address = dma_map_single(NULL, + idma->dma.buf.dma_address = dma_map_single(&isa_dma_dev, idma->dma.addr, idma->dma.count, idma->dma.dma_mode == DMA_MODE_READ ? DMA_FROM_DEVICE : DMA_TO_DEVICE); |