diff options
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 c9a945fd1a0..3c8c0232ce4 100644 --- a/drivers/base/dma-buf.c +++ b/drivers/base/dma-buf.c | |||
@@ -107,17 +107,18 @@ EXPORT_SYMBOL_GPL(dma_buf_export); | |||
107 | /** | 107 | /** |
108 | * dma_buf_fd - returns a file descriptor for the given dma_buf | 108 | * dma_buf_fd - returns a file descriptor for the given dma_buf |
109 | * @dmabuf: [in] pointer to dma_buf for which fd is required. | 109 | * @dmabuf: [in] pointer to dma_buf for which fd is required. |
110 | * @flags: [in] flags to give to fd | ||
110 | * | 111 | * |
111 | * On success, returns an associated 'fd'. Else, returns error. | 112 | * On success, returns an associated 'fd'. Else, returns error. |
112 | */ | 113 | */ |
113 | int dma_buf_fd(struct dma_buf *dmabuf) | 114 | int dma_buf_fd(struct dma_buf *dmabuf, int flags) |
114 | { | 115 | { |
115 | int error, fd; | 116 | int error, fd; |
116 | 117 | ||
117 | if (!dmabuf || !dmabuf->file) | 118 | if (!dmabuf || !dmabuf->file) |
118 | return -EINVAL; | 119 | return -EINVAL; |
119 | 120 | ||
120 | error = get_unused_fd(); | 121 | error = get_unused_fd_flags(flags); |
121 | if (error < 0) | 122 | if (error < 0) |
122 | return error; | 123 | return error; |
123 | fd = error; | 124 | fd = error; |