summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/dma-isa.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-12-21 14:56:38 +0100
committerChristoph Hellwig <hch@lst.de>2019-04-08 17:52:45 +0200
commit5ab6a91a1cacd827382897a80425df8a2d27744a (patch)
treed51221b13cad9ddc44b4d56ab1d50299b00e9723 /arch/arm/kernel/dma-isa.c
parent02c486f483434286bbc775d160fa901fdb4f9ff6 (diff)
downloadlinux-stable-5ab6a91a1cacd827382897a80425df8a2d27744a.tar.gz
linux-stable-5ab6a91a1cacd827382897a80425df8a2d27744a.tar.bz2
linux-stable-5ab6a91a1cacd827382897a80425df8a2d27744a.zip
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/kernel/dma-isa.c')
-rw-r--r--arch/arm/kernel/dma-isa.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/kernel/dma-isa.c b/arch/arm/kernel/dma-isa.c
index 84363fe7bad2..10c45cc6b957 100644
--- a/arch/arm/kernel/dma-isa.c
+++ b/arch/arm/kernel/dma-isa.c
@@ -55,6 +55,12 @@ static int isa_get_dma_residue(unsigned int chan, dma_t *dma)
return chan < 4 ? count : (count << 1);
}
+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 isa_enable_dma(unsigned int chan, dma_t *dma)
{
if (dma->invalid) {
@@ -89,7 +95,7 @@ static void isa_enable_dma(unsigned int chan, dma_t *dma)
dma->sg = &dma->buf;
dma->sgcount = 1;
dma->buf.length = dma->count;
- dma->buf.dma_address = dma_map_single(NULL,
+ dma->buf.dma_address = dma_map_single(&isa_dma_dev,
dma->addr, dma->count,
direction);
}