diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-01-28 16:06:53 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-01-28 16:06:53 -0500 |
commit | 6016a363f6b56b46b24655bcfc0499b715851cf3 (patch) | |
tree | aaca35be4765ec7c7d847bed702c121bbd1b8a81 /drivers/of | |
parent | 923f7e30b480438f1e86e01e5cde814248b59a39 (diff) |
of: unify phandle name in struct device_node
In struct device_node, the phandle is named 'linux_phandle' for PowerPC
and MicroBlaze, and 'node' for SPARC. There is no good reason for the
difference, it is just an artifact of the code diverging over a couple
of years. This patch renames both to simply .phandle.
Note: the .node also existed in PowerPC/MicroBlaze, but the only user
seems to be arch/powerpc/platforms/powermac/pfunc_core.c. It doesn't
look like the assignment between .linux_phandle and .node is
significantly different enough to warrant the separate code paths
unless ibm,phandle properties actually appear in Apple device trees.
I think it is safe to eliminate the old .node property and use
phandle everywhere.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/fdt.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 616a4767a950..7f8861121a31 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
@@ -310,12 +310,11 @@ unsigned long __init unflatten_dt_node(unsigned long mem, | |||
310 | __alignof__(struct property)); | 310 | __alignof__(struct property)); |
311 | if (allnextpp) { | 311 | if (allnextpp) { |
312 | if (strcmp(pname, "linux,phandle") == 0) { | 312 | if (strcmp(pname, "linux,phandle") == 0) { |
313 | np->node = *((u32 *)*p); | 313 | if (np->phandle == 0) |
314 | if (np->linux_phandle == 0) | 314 | np->phandle = *((u32 *)*p); |
315 | np->linux_phandle = np->node; | ||
316 | } | 315 | } |
317 | if (strcmp(pname, "ibm,phandle") == 0) | 316 | if (strcmp(pname, "ibm,phandle") == 0) |
318 | np->linux_phandle = *((u32 *)*p); | 317 | np->phandle = *((u32 *)*p); |
319 | pp->name = pname; | 318 | pp->name = pname; |
320 | pp->length = sz; | 319 | pp->length = sz; |
321 | pp->value = (void *)*p; | 320 | pp->value = (void *)*p; |