aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-01-28 16:06:53 -0500
committerGrant Likely <grant.likely@secretlab.ca>2010-01-28 16:06:53 -0500
commit6016a363f6b56b46b24655bcfc0499b715851cf3 (patch)
treeaaca35be4765ec7c7d847bed702c121bbd1b8a81 /arch/powerpc/platforms
parent923f7e30b480438f1e86e01e5cde814248b59a39 (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 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c6
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_core.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c
index 4c506c1463cd..891f18e337a2 100644
--- a/arch/powerpc/platforms/cell/spu_manage.c
+++ b/arch/powerpc/platforms/cell/spu_manage.c
@@ -457,7 +457,7 @@ neighbour_spu(int cbe, struct device_node *target, struct device_node *avoid)
457 continue; 457 continue;
458 vic_handles = of_get_property(spu_dn, "vicinity", &lenp); 458 vic_handles = of_get_property(spu_dn, "vicinity", &lenp);
459 for (i=0; i < (lenp / sizeof(phandle)); i++) { 459 for (i=0; i < (lenp / sizeof(phandle)); i++) {
460 if (vic_handles[i] == target->linux_phandle) 460 if (vic_handles[i] == target->phandle)
461 return spu; 461 return spu;
462 } 462 }
463 } 463 }
@@ -499,7 +499,7 @@ static void init_affinity_node(int cbe)
499 499
500 if (strcmp(name, "spe") == 0) { 500 if (strcmp(name, "spe") == 0) {
501 spu = devnode_spu(cbe, vic_dn); 501 spu = devnode_spu(cbe, vic_dn);
502 avoid_ph = last_spu_dn->linux_phandle; 502 avoid_ph = last_spu_dn->phandle;
503 } else { 503 } else {
504 /* 504 /*
505 * "mic-tm" and "bif0" nodes do not have 505 * "mic-tm" and "bif0" nodes do not have
@@ -514,7 +514,7 @@ static void init_affinity_node(int cbe)
514 last_spu->has_mem_affinity = 1; 514 last_spu->has_mem_affinity = 1;
515 spu->has_mem_affinity = 1; 515 spu->has_mem_affinity = 1;
516 } 516 }
517 avoid_ph = vic_dn->linux_phandle; 517 avoid_ph = vic_dn->phandle;
518 } 518 }
519 519
520 list_add_tail(&spu->aff_list, &last_spu->aff_list); 520 list_add_tail(&spu->aff_list, &last_spu->aff_list);
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index 96d5ce50364e..ede49e78a8da 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -842,7 +842,7 @@ struct pmf_function *__pmf_find_function(struct device_node *target,
842 list_for_each_entry(func, &dev->functions, link) { 842 list_for_each_entry(func, &dev->functions, link) {
843 if (name && strcmp(name, func->name)) 843 if (name && strcmp(name, func->name))
844 continue; 844 continue;
845 if (func->phandle && target->node != func->phandle) 845 if (func->phandle && target->phandle != func->phandle)
846 continue; 846 continue;
847 if ((func->flags & flags) == 0) 847 if ((func->flags & flags) == 0)
848 continue; 848 continue;