diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-24 10:05:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-24 10:05:39 -0700 |
commit | b3f4ef0bf21da37e4dfc1cdfa0288ba39186fb56 (patch) | |
tree | 7239d8ee8302e3bb7ff74d9bc6195ab6bb52295c /drivers/staging | |
parent | d6a4c0e5d3d433ef296f8f417e835329a834a256 (diff) | |
parent | 72449cb47b0104c32ff8fb9380ade9113375d8d1 (diff) |
Merge tag 'dma-buf-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits/dma-buf
Pull dma-buf updates from Sumit Semwal:
"Minor cleanup only; this could've gone in for the 4.0 merge window,
but for a copy-paste stupidity from me.
It has been in the for-next since then, and no issues reported.
- cleanup of dma_buf_export()
- correction of copy-paste stupidity while doing the cleanup"
* tag 'dma-buf-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits/dma-buf:
staging: android: ion: fix wrong init of dma_buf_export_info
dma-buf: cleanup dma_buf_export() to make it easily extensible
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/android/ion/ion.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 0e3d8c7add24..b0b96ab31954 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -1106,6 +1106,7 @@ struct dma_buf *ion_share_dma_buf(struct ion_client *client, struct ion_buffer *buffer; struct dma_buf *dmabuf; bool valid_handle; + DEFINE_DMA_BUF_EXPORT_INFO(exp_info); mutex_lock(&client->lock); valid_handle = ion_handle_validate(client, handle); @@ -1118,8 +1119,12 @@ struct dma_buf *ion_share_dma_buf(struct ion_client *client, ion_buffer_get(buffer); mutex_unlock(&client->lock); - dmabuf = dma_buf_export(buffer, &dma_buf_ops, buffer->size, O_RDWR, - NULL); + exp_info.ops = &dma_buf_ops; + exp_info.size = buffer->size; + exp_info.flags = O_RDWR; + exp_info.priv = buffer; + + dmabuf = dma_buf_export(&exp_info); if (IS_ERR(dmabuf)) { ion_buffer_put(buffer); return dmabuf; |