summaryrefstree
path: root/kernel/include/linux/dma-buf-container.h
blob: f646fc9201f004647309bfe9474822fa97457d31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

#ifndef _LINUX_DMA_BUF_CONTAINER_H_
#define _LINUX_DMA_BUF_CONTAINER_H_

#ifdef CONFIG_DMA_BUF_CONTAINER

int dmabuf_container_get_count(struct dma_buf *dmabuf);
struct dma_buf *dmabuf_container_get_buffer(struct dma_buf *dmabuf, int index);
int dmabuf_container_set_mask(struct dma_buf *dmabuf, u32 mask);
int dmabuf_container_get_mask(struct dma_buf *dmabuf, u32 *mask);

#else

static inline int dmabuf_container_get_count(struct dma_buf *dmabuf)
{
	return -EINVAL;
}

static inline struct dma_buf *dmabuf_container_get_buffer(struct dma_buf *dbuf,
							  int index)
{
	return NULL;
}

static inline int dmabuf_container_set_mask(struct dma_buf *dmabuf, u32 mask)
{
	return -EINVAL;
}

static inline int dmabuf_container_get_mask(struct dma_buf *dmabuf, u32 *mask)
{
	return -EINVAL;
}

#endif

#endif /* _LINUX_DMA_BUF_CONTAINER_H_ */