From: Christoph Hellwig Date: Wed, 20 Dec 2017 15:14:10 +0000 (+0100) Subject: hexagon: use the generic dma_capable helper X-Git-Tag: v4.16-rc1~139^2~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bf15f90b07de75a0873bee7e41b138961c049137;p=thirdparty%2Fkernel%2Flinux.git hexagon: use the generic dma_capable helper Signed-off-by: Christoph Hellwig Acked-by: Richard Kuo --- diff --git a/arch/hexagon/include/asm/dma-mapping.h b/arch/hexagon/include/asm/dma-mapping.h index 5208de242e794..263f6acbfb0f0 100644 --- a/arch/hexagon/include/asm/dma-mapping.h +++ b/arch/hexagon/include/asm/dma-mapping.h @@ -37,11 +37,4 @@ static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) return dma_ops; } -static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) -{ - if (!dev->dma_mask) - return 0; - return addr + size - 1 <= *dev->dma_mask; -} - #endif diff --git a/arch/hexagon/kernel/dma.c b/arch/hexagon/kernel/dma.c index 546792d176a48..ad8347c29dcfa 100644 --- a/arch/hexagon/kernel/dma.c +++ b/arch/hexagon/kernel/dma.c @@ -19,6 +19,7 @@ */ #include +#include #include #include #include