Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297196
b: refs/heads/master
c: f9a24d1
h: refs/heads/master
v: v3
  • Loading branch information
Rob Clark authored and Sumit Semwal committed Mar 26, 2012
1 parent 99244f5 commit b65fc8f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55c1c4ca23d0f2736ef7c219d0fb005323ff8ee0
refs/heads/master: f9a24d1ac9cb82baf5ec5efdb6580a9ce0bd5bfc
15 changes: 15 additions & 0 deletions trunk/include/linux/dma-buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <linux/scatterlist.h>
#include <linux/list.h>
#include <linux/dma-mapping.h>
#include <linux/fs.h>

struct dma_buf;
struct dma_buf_attachment;
Expand Down Expand Up @@ -110,6 +111,20 @@ struct dma_buf_attachment {
void *priv;
};

/**
* get_dma_buf - convenience wrapper for get_file.
* @dmabuf: [in] pointer to dma_buf
*
* Increments the reference count on the dma-buf, needed in case of drivers
* that either need to create additional references to the dmabuf on the
* kernel side. For example, an exporter that needs to keep a dmabuf ptr
* so that subsequent exports don't create a new dmabuf.
*/
static inline void get_dma_buf(struct dma_buf *dmabuf)
{
get_file(dmabuf->file);
}

#ifdef CONFIG_DMA_SHARED_BUFFER
struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
struct device *dev);
Expand Down

0 comments on commit b65fc8f

Please sign in to comment.