aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
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/kernel
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/kernel')
-rw-r--r--arch/powerpc/kernel/of_platform.c2
-rw-r--r--arch/powerpc/kernel/prom.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 1a4fc0d11a03..666d08db319e 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -214,7 +214,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
214static int of_dev_phandle_match(struct device *dev, void *data) 214static int of_dev_phandle_match(struct device *dev, void *data)
215{ 215{
216 phandle *ph = data; 216 phandle *ph = data;
217 return to_of_device(dev)->node->linux_phandle == *ph; 217 return to_of_device(dev)->node->phandle == *ph;
218} 218}
219 219
220struct of_device *of_find_device_by_phandle(phandle ph) 220struct of_device *of_find_device_by_phandle(phandle ph)
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index deccd91d7e81..1ed2ec2ea05b 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -778,7 +778,7 @@ struct device_node *of_find_node_by_phandle(phandle handle)
778 778
779 read_lock(&devtree_lock); 779 read_lock(&devtree_lock);
780 for (np = allnodes; np != 0; np = np->allnext) 780 for (np = allnodes; np != 0; np = np->allnext)
781 if (np->linux_phandle == handle) 781 if (np->phandle == handle)
782 break; 782 break;
783 of_node_get(np); 783 of_node_get(np);
784 read_unlock(&devtree_lock); 784 read_unlock(&devtree_lock);
@@ -907,9 +907,9 @@ static int of_finish_dynamic_node(struct device_node *node)
907 if (machine_is(powermac)) 907 if (machine_is(powermac))
908 return -ENODEV; 908 return -ENODEV;
909 909
910 /* fix up new node's linux_phandle field */ 910 /* fix up new node's phandle field */
911 if ((ibm_phandle = of_get_property(node, "ibm,phandle", NULL))) 911 if ((ibm_phandle = of_get_property(node, "ibm,phandle", NULL)))
912 node->linux_phandle = *ibm_phandle; 912 node->phandle = *ibm_phandle;
913 913
914out: 914out:
915 of_node_put(parent); 915 of_node_put(parent);