dma-buf: add dma_data_direction to unmap dma_buf_op
[linux-2.6.git] / drivers / base / dma-buf.c
index 8afe2dd..c9a945f 100644 (file)
@@ -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);
 
 }