From 99244f518dd32b7fa95dbf0891387b7836ef2480 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 16 Mar 2012 10:34:02 +0000 Subject: [PATCH] --- yaml --- r: 297195 b: refs/heads/master c: 55c1c4ca23d0f2736ef7c219d0fb005323ff8ee0 h: refs/heads/master i: 297193: 08b1ce100b1272ea50be5b09e20a117761c3203b 297191: dea7b5af52c376720a64cbd02a4f27c3734ed4e0 v: v3 --- [refs] | 2 +- trunk/drivers/base/dma-buf.c | 5 +++-- trunk/include/linux/dma-buf.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 3c8f51e3b34e..eb4336b3ba27 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 33ea2dcb39ba50b0b69d1b1dc24702f084b46411 +refs/heads/master: 55c1c4ca23d0f2736ef7c219d0fb005323ff8ee0 diff --git a/trunk/drivers/base/dma-buf.c b/trunk/drivers/base/dma-buf.c index c9a945fd1a04..3c8c0232ce43 100644 --- a/trunk/drivers/base/dma-buf.c +++ b/trunk/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; diff --git a/trunk/include/linux/dma-buf.h b/trunk/include/linux/dma-buf.h index a885b2689b8f..891457a86b30 100644 --- a/trunk/include/linux/dma-buf.h +++ b/trunk/include/linux/dma-buf.h @@ -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);