Hi Rob,On 25 August 2011 06:33, Clark, Rob <rob@ti.com> wrote: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.Hmmm... Do you mean the platform driver (device?) ptr? That's a good idea - I will make these changes you suggested, and re-post. I'm thinking of posting the next version to the upstream mailing lists as well.
Everyone: if you could please spend some time for a review, it'd help me post something without obvious, stupid mistakes to the upstream mailing lists.Thanks and best regards,~Sumit.
BR,
-R