summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-12 17:06:04 +0100
committerChristoph Hellwig <hch@lst.de>2019-11-20 20:31:40 +0100
commit130c1ccbf55330b55e82612a6e54eebb82c9d746 (patch)
treed61b03639384aa3357871b756082ff6966dcbf38 /arch/mips
parent56e35f9c5b87ec1ae93e483284e189c84388de16 (diff)
dma-direct: unify the dma_capable definitions
Currently each architectures that wants to override dma_to_phys and phys_to_dma also has to provide dma_capable. But there isn't really any good reason for that. powerpc and mips just have copies of the generic one minus the latests fix, and the arm one was the inspiration for said fix, but misses the bus_dma_mask handling. Make all architectures use the generic version instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/dma-direct.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/arch/mips/include/asm/dma-direct.h b/arch/mips/include/asm/dma-direct.h
index b5c240806e1b..14e352651ce9 100644
--- a/arch/mips/include/asm/dma-direct.h
+++ b/arch/mips/include/asm/dma-direct.h
@@ -2,14 +2,6 @@
#ifndef _MIPS_DMA_DIRECT_H
#define _MIPS_DMA_DIRECT_H 1
-static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
-{
- if (!dev->dma_mask)
- return false;
-
- return addr + size - 1 <= *dev->dma_mask;
-}
-
dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr);
phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t daddr);