On Thu, Sep 08, 2011 at 08:45:43PM +0530, Sumit Semwal wrote:
On 8 September 2011 19:48, Clark, Rob rob@ti.com wrote:
actually, all I think we needed was to add 'struct device *' to get_scatterlist (and maybe doesn't hurt for put).. I'm not entirely sure why we need create/attach_device? The create fxn especially seems wrong.. what if you are the 2nd device to import the buffer?
Ah... I guess I misunderstood your 'it seems like a sane approach' to mean you agree with the 2-step process suggested by Daniel :) - my bad!
On re-reading Rob's response I think there's a misunderstanding. I don't want a create function in the dma_buf_ops. The create would be a generic dma_buf subsystem function that (like in the patch) allocates the struct and properly registers the fd and what not else. The attach_device would then be the only new function in dma_buf_ops.
The confusion probably stems from my other proposal to hide these function pointers behind small inline helpers for the in-kernel api. -Daniel