[v8,2/3] gpu: ion: add private field in ion_heap and ion_platform_heap structure

Message ID 1354870964-13087-3-git-send-email-benjamin.gaignard@linaro.org
State New
Headers show

Commit Message

Benjamin Gaignard Dec. 7, 2012, 9:02 a.m.
copy private field from platform configuration to internal heap structure.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
---
 drivers/gpu/ion/ion_heap.c |    1 +
 drivers/gpu/ion/ion_priv.h |    2 ++
 include/linux/ion.h        |    2 ++
 3 files changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/ion/ion_heap.c b/drivers/gpu/ion/ion_heap.c
index 8ce3c19..f9ab1df 100644
--- a/drivers/gpu/ion/ion_heap.c
+++ b/drivers/gpu/ion/ion_heap.c
@@ -47,6 +47,7 @@  struct ion_heap *ion_heap_create(struct ion_platform_heap *heap_data)
 
 	heap->name = heap_data->name;
 	heap->id = heap_data->id;
+	heap->priv = heap_data->priv;
 	return heap;
 }
 
diff --git a/drivers/gpu/ion/ion_priv.h b/drivers/gpu/ion/ion_priv.h
index 21c1963..a31203b 100644
--- a/drivers/gpu/ion/ion_priv.h
+++ b/drivers/gpu/ion/ion_priv.h
@@ -117,6 +117,7 @@  struct ion_heap_ops {
  *			allocating.  These are specified by platform data and
  *			MUST be unique
  * @name:		used for debugging
+ * @priv:		heap private data
  * @debug_show:		called when heap debug file is read to add any
  *			heap specific debug info to output
  *
@@ -132,6 +133,7 @@  struct ion_heap {
 	struct ion_heap_ops *ops;
 	int id;
 	const char *name;
+	void *priv;
 	int (*debug_show)(struct ion_heap *heap, struct seq_file *, void *);
 };
 
diff --git a/include/linux/ion.h b/include/linux/ion.h
index 6541a11..b85f4b1 100644
--- a/include/linux/ion.h
+++ b/include/linux/ion.h
@@ -77,6 +77,7 @@  struct ion_buffer;
  * @name:	used for debug purposes
  * @base:	base address of heap in physical memory if applicable
  * @size:	size of the heap in bytes if applicable
+ * @priv:	heap private data
  *
  * Provided by the board file.
  */
@@ -86,6 +87,7 @@  struct ion_platform_heap {
 	const char *name;
 	ion_phys_addr_t base;
 	size_t size;
+	void *priv;
 };
 
 /**