]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/dma-buf.h
dma-buf: add dma_data_direction to unmap dma_buf_op
[karo-tx-linux.git] / include / linux / dma-buf.h
index 86f6241410482efefe77322c1b8c3b72a0b99eb2..a885b2689b8f9c6988df70b40aaa423294a3baf9 100644 (file)
@@ -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;
 }