mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
- cleanup of dma_buf_export()
- correction of copy-paste stupidity while doing the cleanup -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJVOizVAAoJEAG+/NWsLn5bAqIP/2EP/eC34lYCdYkQ2rUnOJXr vWSlyRi+RCjDR5y4hkjp6q8R0WAQSuOPcUZ8FRZjN5DO3pQF3ZEHnGbM/7O2SIeb cthGcue5PIOzj55ftmefJCa5PArqK1XnQT09gEisvXKxjdTfYEpSyRV1WKmtI6N2 SrIKJaj5Kx18CV56+AvgsyDKZ7DuKeKCHMoRrTInfUr1gjifwZWppkSkH79LMkGP p/dFbV2Ia2Zetc4k6j72jpIxMhJnPSXh8SpaeQ6EpRfTy1E1o9qCjruE2RfFk1wa VF+uHNpjyQRVaJH4RwLVPqrDtZqHgB1LqRj2fm9wKhagrZ83G/h7MKnWGqIB9yGf l6HM8ReEKTFOzj9LxRGdBltL/ZdInEUcBf8OgkIT3R4lm1RZc55Erfta7vOXl31v 2mkBYcAq4vOTBJkcIxS0TPLoHFJScwj/cdV16AHAgnR263/Ulh7RDwuEIMXEQ9C+ 65Nwm0MNWS2UiGwXnMz/7UT1u5NdxhJ1j6e7iWaRBL6mh1MuzidiR5TLx6+Bdroo KQ1N2qyf1PxXUR995JsWOMivkQWKPvO53jpaEdVKt4uTSvEuunvHembqtHinNfj4 ljCjO+Bc0ust8wlyilIUmh0hsPBOM3z66XxbTcCFp+gjcJW/L+VfBxnKlokhN9lH Y6Q4uwY13gJXGZ806gDk =ULmO -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
b3f4ef0bf2
15 changed files with 152 additions and 63 deletions
|
|
@ -402,6 +402,12 @@ static struct dma_buf *vb2_dc_get_dmabuf(void *buf_priv, unsigned long flags)
|
|||
{
|
||||
struct vb2_dc_buf *buf = buf_priv;
|
||||
struct dma_buf *dbuf;
|
||||
DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
|
||||
|
||||
exp_info.ops = &vb2_dc_dmabuf_ops;
|
||||
exp_info.size = buf->size;
|
||||
exp_info.flags = flags;
|
||||
exp_info.priv = buf;
|
||||
|
||||
if (!buf->sgt_base)
|
||||
buf->sgt_base = vb2_dc_get_base_sgt(buf);
|
||||
|
|
@ -409,7 +415,7 @@ static struct dma_buf *vb2_dc_get_dmabuf(void *buf_priv, unsigned long flags)
|
|||
if (WARN_ON(!buf->sgt_base))
|
||||
return NULL;
|
||||
|
||||
dbuf = dma_buf_export(buf, &vb2_dc_dmabuf_ops, buf->size, flags, NULL);
|
||||
dbuf = dma_buf_export(&exp_info);
|
||||
if (IS_ERR(dbuf))
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -583,11 +583,17 @@ static struct dma_buf *vb2_dma_sg_get_dmabuf(void *buf_priv, unsigned long flags
|
|||
{
|
||||
struct vb2_dma_sg_buf *buf = buf_priv;
|
||||
struct dma_buf *dbuf;
|
||||
DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
|
||||
|
||||
exp_info.ops = &vb2_dma_sg_dmabuf_ops;
|
||||
exp_info.size = buf->size;
|
||||
exp_info.flags = flags;
|
||||
exp_info.priv = buf;
|
||||
|
||||
if (WARN_ON(!buf->dma_sgt))
|
||||
return NULL;
|
||||
|
||||
dbuf = dma_buf_export(buf, &vb2_dma_sg_dmabuf_ops, buf->size, flags, NULL);
|
||||
dbuf = dma_buf_export(&exp_info);
|
||||
if (IS_ERR(dbuf))
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -368,11 +368,17 @@ static struct dma_buf *vb2_vmalloc_get_dmabuf(void *buf_priv, unsigned long flag
|
|||
{
|
||||
struct vb2_vmalloc_buf *buf = buf_priv;
|
||||
struct dma_buf *dbuf;
|
||||
DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
|
||||
|
||||
exp_info.ops = &vb2_vmalloc_dmabuf_ops;
|
||||
exp_info.size = buf->size;
|
||||
exp_info.flags = flags;
|
||||
exp_info.priv = buf;
|
||||
|
||||
if (WARN_ON(!buf->vaddr))
|
||||
return NULL;
|
||||
|
||||
dbuf = dma_buf_export(buf, &vb2_vmalloc_dmabuf_ops, buf->size, flags, NULL);
|
||||
dbuf = dma_buf_export(&exp_info);
|
||||
if (IS_ERR(dbuf))
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue