diff options
-rw-r--r-- | include/linux/dma-mapping.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 27d1421ad42c..fd4aee29ad10 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -153,6 +153,13 @@ static inline int dma_set_seg_boundary(struct device *dev, unsigned long mask) | |||
153 | return -EIO; | 153 | return -EIO; |
154 | } | 154 | } |
155 | 155 | ||
156 | #ifndef dma_max_pfn | ||
157 | static inline unsigned long dma_max_pfn(struct device *dev) | ||
158 | { | ||
159 | return *dev->dma_mask >> PAGE_SHIFT; | ||
160 | } | ||
161 | #endif | ||
162 | |||
156 | static inline void *dma_zalloc_coherent(struct device *dev, size_t size, | 163 | static inline void *dma_zalloc_coherent(struct device *dev, size_t size, |
157 | dma_addr_t *dma_handle, gfp_t flag) | 164 | dma_addr_t *dma_handle, gfp_t flag) |
158 | { | 165 | { |