Hi,
On 12/14/2012 10:36 AM, sumit.semwal@ti.com wrote:
From: Sumit Semwal sumit.semwal@linaro.org
Add debugfs support to make it easier to print debug information about the dma-buf buffers.
Signed-off-by: Sumit Semwal sumit.semwal@ti.com
drivers/base/dma-buf.c | 149 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/dma-buf.h | 6 +- 2 files changed, 154 insertions(+), 1 deletion(-)
[...]
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index bd2e52c..160453f 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -112,6 +112,7 @@ struct dma_buf_ops {
- @file: file pointer used for sharing buffers across, and for refcounting.
- @attachments: list of dma_buf_attachment that denotes all devices attached.
- @ops: dma_buf_ops associated with this buffer object.
*/
- @list_node: node for dma_buf accounting and debugging.
- @priv: exporter specific private data for this buffer object.
struct dma_buf { @@ -121,6 +122,8 @@ struct dma_buf { const struct dma_buf_ops *ops; /* mutex to serialize list manipulation and attach/detach */ struct mutex lock;
- struct list_head list_node; void *priv;
}; @@ -183,5 +186,6 @@ int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, unsigned long); void *dma_buf_vmap(struct dma_buf *); void dma_buf_vunmap(struct dma_buf *, void *vaddr);
+int dma_buf_debugfs_create_file(const char *name,
int (*write)(struct seq_file *));
Why is this function declared in the public header file?
-- Francesco