Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297195
b: refs/heads/master
c: 55c1c4c
h: refs/heads/master
i:
  297193: 08b1ce1
  297191: dea7b5a
v: v3
  • Loading branch information
Dave Airlie authored and Sumit Semwal committed Mar 26, 2012
1 parent 9d2c8a8 commit 99244f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 33ea2dcb39ba50b0b69d1b1dc24702f084b46411
refs/heads/master: 55c1c4ca23d0f2736ef7c219d0fb005323ff8ee0
5 changes: 3 additions & 2 deletions trunk/drivers/base/dma-buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,18 @@ EXPORT_SYMBOL_GPL(dma_buf_export);
/**
* dma_buf_fd - returns a file descriptor for the given dma_buf
* @dmabuf: [in] pointer to dma_buf for which fd is required.
* @flags: [in] flags to give to fd
*
* On success, returns an associated 'fd'. Else, returns error.
*/
int dma_buf_fd(struct dma_buf *dmabuf)
int dma_buf_fd(struct dma_buf *dmabuf, int flags)
{
int error, fd;

if (!dmabuf || !dmabuf->file)
return -EINVAL;

error = get_unused_fd();
error = get_unused_fd_flags(flags);
if (error < 0)
return error;
fd = error;
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/dma-buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void dma_buf_detach(struct dma_buf *dmabuf,
struct dma_buf_attachment *dmabuf_attach);
struct dma_buf *dma_buf_export(void *priv, const struct dma_buf_ops *ops,
size_t size, int flags);
int dma_buf_fd(struct dma_buf *dmabuf);
int dma_buf_fd(struct dma_buf *dmabuf, int flags);
struct dma_buf *dma_buf_get(int fd);
void dma_buf_put(struct dma_buf *dmabuf);

Expand Down

0 comments on commit 99244f5

Please sign in to comment.