aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/dma-mapping.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 952e0f857ac9..6ed50c1642f1 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -48,6 +48,11 @@ static inline int is_device_dma_capable(struct device *dev)
48 return dev->dma_mask != NULL && *dev->dma_mask != DMA_MASK_NONE; 48 return dev->dma_mask != NULL && *dev->dma_mask != DMA_MASK_NONE;
49} 49}
50 50
51static inline int is_buffer_dma_capable(u64 mask, dma_addr_t addr, size_t size)
52{
53 return addr + size <= mask;
54}
55
51#ifdef CONFIG_HAS_DMA 56#ifdef CONFIG_HAS_DMA
52#include <asm/dma-mapping.h> 57#include <asm/dma-mapping.h>
53#else 58#else