hexagon: use the generic dma_capable helper
authorChristoph Hellwig <hch@lst.de>
Wed, 20 Dec 2017 15:14:10 +0000 (16:14 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 10 Jan 2018 15:41:13 +0000 (16:41 +0100)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Richard Kuo <rkuo@codeaurora.org>
arch/hexagon/include/asm/dma-mapping.h
arch/hexagon/kernel/dma.c

index 5208de242e794b2c3045490254044348e0de6cdd..263f6acbfb0f09b1554dd7a49f2f4b7c30d9a058 100644 (file)
@@ -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
index 546792d176a4801b7b4f7659ec3953a948a85ba0..ad8347c29dcfaa5b598cc182ab0bfa02dd2ae7f6 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include <linux/dma-mapping.h>
+#include <linux/dma-direct.h>
 #include <linux/bootmem.h>
 #include <linux/genalloc.h>
 #include <asm/dma-mapping.h>