Hi Rob,
On Wed, Aug 10, 2011 at 7:11 AM, Sumit Semwal <sumit.semwal@ti.com> wrote:hmm, I wonder if we should stuff a ptr in there to store the creating
>
> +/**
> + * struct dma_buf - shared buffer object
> + * @file: file pointer used for sharing buffers across, and for refcounting.
> + * @ops: dma_buf_ops associated with this buffer object
> + * @priv: user specific private data
> + */
> +struct dma_buf {
> + struct file *file;
> + struct dma_buf_ops *ops;
> + void *priv;
> +};
> +
driver (or device?) ptr? This way if it somehow gets passed back to
the creating driver, it could realize that it is a dma_buf that it
created in the first place.. and that it was safe to cast and deref
the priv ptr.
BR,
-R
_______________________________________________
Linaro-mm-sig mailing list
Linaro-mm-sig@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-mm-sig
Thanks and regards,
Sumit Semwal
Linaro Kernel Engineer - Graphics working group
Linaro.org │ Open source software for ARM SoCs