From 9d2c8a8625c568303377a8c1677d4b95a7bbf858 Mon Sep 17 00:00:00 2001 From: Sumit Semwal Date: Fri, 27 Jan 2012 15:09:27 +0530 Subject: [PATCH] --- yaml --- r: 297194 b: refs/heads/master c: 33ea2dcb39ba50b0b69d1b1dc24702f084b46411 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/base/dma-buf.c | 7 +++++-- trunk/include/linux/dma-buf.h | 8 +++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 0b2202af52e6..3c8f51e3b34e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2ed9201bdd9a8e462d768a838fb2bc944c6887a4 +refs/heads/master: 33ea2dcb39ba50b0b69d1b1dc24702f084b46411 diff --git a/trunk/drivers/base/dma-buf.c b/trunk/drivers/base/dma-buf.c index 8afe2dd17912..c9a945fd1a04 100644 --- a/trunk/drivers/base/dma-buf.c +++ b/trunk/drivers/base/dma-buf.c @@ -271,16 +271,19 @@ EXPORT_SYMBOL_GPL(dma_buf_map_attachment); * dma_buf_ops. * @attach: [in] attachment to unmap buffer from * @sg_table: [in] scatterlist info of the buffer to unmap + * @direction: [in] direction of DMA transfer * */ void dma_buf_unmap_attachment(struct dma_buf_attachment *attach, - struct sg_table *sg_table) + struct sg_table *sg_table, + enum dma_data_direction direction) { if (WARN_ON(!attach || !attach->dmabuf || !sg_table)) return; mutex_lock(&attach->dmabuf->lock); - attach->dmabuf->ops->unmap_dma_buf(attach, sg_table); + attach->dmabuf->ops->unmap_dma_buf(attach, sg_table, + direction); mutex_unlock(&attach->dmabuf->lock); } diff --git a/trunk/include/linux/dma-buf.h b/trunk/include/linux/dma-buf.h index 86f624141048..a885b2689b8f 100644 --- a/trunk/include/linux/dma-buf.h +++ b/trunk/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; }