diff options
Diffstat (limited to 'include/linux/dma-buf.h')
-rw-r--r-- | include/linux/dma-buf.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index 1f78d1594cc7..a02b1ff6488e 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h | |||
@@ -98,6 +98,9 @@ struct dma_buf_ops { | |||
98 | void (*kunmap)(struct dma_buf *, unsigned long, void *); | 98 | void (*kunmap)(struct dma_buf *, unsigned long, void *); |
99 | 99 | ||
100 | int (*mmap)(struct dma_buf *, struct vm_area_struct *vma); | 100 | int (*mmap)(struct dma_buf *, struct vm_area_struct *vma); |
101 | |||
102 | void *(*vmap)(struct dma_buf *); | ||
103 | void (*vunmap)(struct dma_buf *, void *vaddr); | ||
101 | }; | 104 | }; |
102 | 105 | ||
103 | /** | 106 | /** |
@@ -176,6 +179,8 @@ void dma_buf_kunmap(struct dma_buf *, unsigned long, void *); | |||
176 | 179 | ||
177 | int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, | 180 | int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, |
178 | unsigned long); | 181 | unsigned long); |
182 | void *dma_buf_vmap(struct dma_buf *); | ||
183 | void dma_buf_vunmap(struct dma_buf *, void *vaddr); | ||
179 | #else | 184 | #else |
180 | 185 | ||
181 | static inline struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, | 186 | static inline struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, |
@@ -264,6 +269,15 @@ static inline int dma_buf_mmap(struct dma_buf *dmabuf, | |||
264 | { | 269 | { |
265 | return -ENODEV; | 270 | return -ENODEV; |
266 | } | 271 | } |
272 | |||
273 | static inline void *dma_buf_vmap(struct dma_buf *dmabuf) | ||
274 | { | ||
275 | return NULL; | ||
276 | } | ||
277 | |||
278 | static inline void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr) | ||
279 | { | ||
280 | } | ||
267 | #endif /* CONFIG_DMA_SHARED_BUFFER */ | 281 | #endif /* CONFIG_DMA_SHARED_BUFFER */ |
268 | 282 | ||
269 | #endif /* __DMA_BUF_H__ */ | 283 | #endif /* __DMA_BUF_H__ */ |