summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSumit Semwal <sumit.semwal@ti.com>2012-01-27 15:09:27 +0530
committerSumit Semwal <sumit.semwal@ti.com>2012-03-26 11:31:58 +0530
commit33ea2dcb39ba50b0b69d1b1dc24702f084b46411 (patch)
treeec1e1b0c223e09861341f82d2aa0b13ec841be95 /include
parent2ed9201bdd9a8e462d768a838fb2bc944c6887a4 (diff)
downloadlinux-33ea2dcb39ba50b0b69d1b1dc24702f084b46411.tar.bz2
dma-buf: add dma_data_direction to unmap dma_buf_op
Some exporters may use DMA map/unmap APIs in dma-buf ops, which require enum dma_data_direction for both map and unmap operations. Thus, the unmap dma_buf_op also needs to have enum dma_data_direction as a parameter. Reported-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Sumit Semwal <sumit.semwal@ti.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dma-buf.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index 86f624141048..a885b2689b8f 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -63,7 +63,8 @@ struct dma_buf_ops {
struct sg_table * (*map_dma_buf)(struct dma_buf_attachment *,
enum dma_data_direction);
void (*unmap_dma_buf)(struct dma_buf_attachment *,
- struct sg_table *);
+ struct sg_table *,
+ enum dma_data_direction);
/* TODO: Add try_map_dma_buf version, to return immed with -EBUSY
* if the call would block.
*/
@@ -122,7 +123,8 @@ void dma_buf_put(struct dma_buf *dmabuf);
struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *,
enum dma_data_direction);
-void dma_buf_unmap_attachment(struct dma_buf_attachment *, struct sg_table *);
+void dma_buf_unmap_attachment(struct dma_buf_attachment *, struct sg_table *,
+ enum dma_data_direction);
#else
static inline struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
@@ -166,7 +168,7 @@ static inline struct sg_table *dma_buf_map_attachment(
}
static inline void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
- struct sg_table *sg)
+ struct sg_table *sg, enum dma_data_direction dir)
{
return;
}