diff options
author | Dave Airlie <airlied@redhat.com> | 2012-03-16 11:34:02 +0100 |
---|---|---|
committer | Sumit Semwal <sumit.semwal@ti.com> | 2012-03-26 08:02:26 +0200 |
commit | 55c1c4ca23d0f2736ef7c219d0fb005323ff8ee0 (patch) | |
tree | 52c2ae868121e09df3d77fc998f233549cf8ae34 /drivers/base/dma-buf.c | |
parent | dma-buf: add dma_data_direction to unmap dma_buf_op (diff) | |
download | linux-55c1c4ca23d0f2736ef7c219d0fb005323ff8ee0.tar.xz linux-55c1c4ca23d0f2736ef7c219d0fb005323ff8ee0.zip |
dma-buf: pass flags into dma_buf_fd.
We need to pass the flags into dma_buf_fd at this point,
so the flags end up doing the right thing for O_CLOEXEC.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Rob Clark <rob@ti.com>
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 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c index c9a945fd1a04..3c8c0232ce43 100644 --- a/drivers/base/dma-buf.c +++ b/drivers/base/dma-buf.c @@ -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; |