diff options
author | Sumit Semwal <sumit.semwal@ti.com> | 2012-01-27 09:39:27 (GMT) |
---|---|---|
committer | Sumit Semwal <sumit.semwal@ti.com> | 2012-03-26 06:01:58 (GMT) |
commit | 33ea2dcb39ba50b0b69d1b1dc24702f084b46411 (patch) | |
tree | ec1e1b0c223e09861341f82d2aa0b13ec841be95 /drivers/base/dma-buf.c | |
parent | 2ed9201bdd9a8e462d768a838fb2bc944c6887a4 (diff) | |
download | linux-33ea2dcb39ba50b0b69d1b1dc24702f084b46411.tar.xz |
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 'drivers/base/dma-buf.c')
-rw-r--r-- | drivers/base/dma-buf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c index 8afe2dd..c9a945f 100644 --- a/drivers/base/dma-buf.c +++ b/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); } |