Thread (3 messages) 3 messages, 3 authors, 2011-08-10

[RFC/PATCH 10/14] dt: Add pd_size to AUXDATA structure

From: G, Manjunath Kondaiah <hidden>
Date: 2011-08-10 16:02:04
Also in: linux-devicetree, linux-omap

On Wed, Aug 10, 2011 at 07:16:30AM -0600, Grant Likely wrote:
On Wed, Aug 10, 2011 at 5:57 AM, Cousson, Benoit [off-list ref] wrote:
quoted
On 8/9/2011 4:10 PM, G, Manjunath Kondaiah wrote:
quoted
Add pd_size in the AUXDATA structure so that device drivers which require
platform_data size can pass along with AUXDATA.
It is really needed by device driver? Or is it because omap_device_build is
using platform_device_add_data that is doing a copy of the pdata and thus
require the size?
Yes, I have the same question.  What is the reason for needing the
platform data size?
Yes. It is required by "omap_device_build" which in turn calls 
"platform_device_add_data" and copies using "kmemdup" and original
pdata pointer memory will get freed.

It is required by hwmod and not device driver. I can change description.
g.
quoted
quoted
Signed-off-by: G, Manjunath Kondaiah<redacted>
---
?drivers/of/platform.c ? ? ? | ? ?2 ++
?include/linux/of_platform.h | ? ?5 +++++
?2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index ebbbf42..4b27286 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -565,6 +565,7 @@ static int of_platform_bus_create(struct device_node
*bus,
? ? ? ?struct platform_device *dev;
? ? ? ?const char *bus_id = NULL;
? ? ? ?void *platform_data = NULL;
+ ? ? ? int pd_size;
Maybe platform_data_size will be a little bit more consistent?
Thought shorter name is better and still it should be readable.

-M
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help