projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CHROMIUM: dma-buf/kds: allow KDS to be compiled out if dma-buf is enabled
[cascardo/linux.git]
/
include
/
linux
/
dma-buf.h
diff --git
a/include/linux/dma-buf.h
b/include/linux/dma-buf.h
index
6e824d2
..
5eb40e7
100644
(file)
--- a/
include/linux/dma-buf.h
+++ b/
include/linux/dma-buf.h
@@
-30,8
+30,10
@@
#include <linux/list.h>
#include <linux/dma-mapping.h>
#include <linux/fs.h>
#include <linux/list.h>
#include <linux/dma-mapping.h>
#include <linux/fs.h>
+#ifdef CONFIG_DMA_SHARED_BUFFER_USES_KDS
#include <linux/kds.h>
#include <linux/wait.h>
#include <linux/kds.h>
#include <linux/wait.h>
+#endif
struct device;
struct dma_buf;
struct device;
struct dma_buf;
@@
-123,10
+125,12
@@
struct dma_buf {
const struct dma_buf_ops *ops;
/* mutex to serialize list manipulation and attach/detach */
struct mutex lock;
const struct dma_buf_ops *ops;
/* mutex to serialize list manipulation and attach/detach */
struct mutex lock;
+#ifdef CONFIG_DMA_SHARED_BUFFER_USES_KDS
struct kds_resource kds;
wait_queue_head_t wq_exclusive;
wait_queue_head_t wq_shared;
struct kds_callback kds_cb;
struct kds_resource kds;
wait_queue_head_t wq_exclusive;
wait_queue_head_t wq_shared;
struct kds_callback kds_cb;
+#endif
void *priv;
};
void *priv;
};
@@
-162,6
+166,7
@@
static inline void get_dma_buf(struct dma_buf *dmabuf)
get_file(dmabuf->file);
}
get_file(dmabuf->file);
}
+#ifdef CONFIG_DMA_SHARED_BUFFER_USES_KDS
/**
* get_dma_buf_kds_resource - get a KDS resource for this dma-buf
* @dmabuf: [in] pointer to dma_buf
/**
* get_dma_buf_kds_resource - get a KDS resource for this dma-buf
* @dmabuf: [in] pointer to dma_buf
@@
-176,6
+181,7
@@
static inline struct kds_resource *
{
return &dmabuf->kds;
}
{
return &dmabuf->kds;
}
+#endif
#ifdef CONFIG_DMA_SHARED_BUFFER
struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
#ifdef CONFIG_DMA_SHARED_BUFFER
struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,