aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-02 20:54:01 -0400
committerPaul Mackerras <paulus@samba.org>2007-04-12 13:55:17 -0400
commit0e56efc7dcd1eb5004363e52bdbe801783245638 (patch)
tree22b3f52d1ccc18d0e820ed69412a8054e20798d1 /arch
parenta7edd0e676d51145ae634a2acf7a447e319200fa (diff)
[POWERPC] Rename get_property to of_get_property
This is more consistent and gets us closer to the Sparc code. We add a get_property define for compatibility during the change over. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/prom.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index ef6bfb70b24a..622472818723 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -400,8 +400,8 @@ static unsigned long __init unflatten_dt_node(unsigned long mem,
400 } 400 }
401 if (allnextpp) { 401 if (allnextpp) {
402 *prev_pp = NULL; 402 *prev_pp = NULL;
403 np->name = get_property(np, "name", NULL); 403 np->name = of_get_property(np, "name", NULL);
404 np->type = get_property(np, "device_type", NULL); 404 np->type = of_get_property(np, "device_type", NULL);
405 405
406 if (!np->name) 406 if (!np->name)
407 np->name = "<NULL>"; 407 np->name = "<NULL>";
@@ -1048,7 +1048,7 @@ prom_n_addr_cells(struct device_node* np)
1048 do { 1048 do {
1049 if (np->parent) 1049 if (np->parent)
1050 np = np->parent; 1050 np = np->parent;
1051 ip = get_property(np, "#address-cells", NULL); 1051 ip = of_get_property(np, "#address-cells", NULL);
1052 if (ip != NULL) 1052 if (ip != NULL)
1053 return *ip; 1053 return *ip;
1054 } while (np->parent); 1054 } while (np->parent);
@@ -1064,7 +1064,7 @@ prom_n_size_cells(struct device_node* np)
1064 do { 1064 do {
1065 if (np->parent) 1065 if (np->parent)
1066 np = np->parent; 1066 np = np->parent;
1067 ip = get_property(np, "#size-cells", NULL); 1067 ip = of_get_property(np, "#size-cells", NULL);
1068 if (ip != NULL) 1068 if (ip != NULL)
1069 return *ip; 1069 return *ip;
1070 } while (np->parent); 1070 } while (np->parent);
@@ -1136,7 +1136,7 @@ int device_is_compatible(const struct device_node *device, const char *compat)
1136 const char* cp; 1136 const char* cp;
1137 int cplen, l; 1137 int cplen, l;
1138 1138
1139 cp = get_property(device, "compatible", &cplen); 1139 cp = of_get_property(device, "compatible", &cplen);
1140 if (cp == NULL) 1140 if (cp == NULL)
1141 return 0; 1141 return 0;
1142 while (cplen > 0) { 1142 while (cplen > 0) {
@@ -1547,8 +1547,8 @@ static int of_finish_dynamic_node(struct device_node *node)
1547 int err = 0; 1547 int err = 0;
1548 const phandle *ibm_phandle; 1548 const phandle *ibm_phandle;
1549 1549
1550 node->name = get_property(node, "name", NULL); 1550 node->name = of_get_property(node, "name", NULL);
1551 node->type = get_property(node, "device_type", NULL); 1551 node->type = of_get_property(node, "device_type", NULL);
1552 1552
1553 if (!parent) { 1553 if (!parent) {
1554 err = -ENODEV; 1554 err = -ENODEV;
@@ -1562,7 +1562,7 @@ static int of_finish_dynamic_node(struct device_node *node)
1562 return -ENODEV; 1562 return -ENODEV;
1563 1563
1564 /* fix up new node's linux_phandle field */ 1564 /* fix up new node's linux_phandle field */
1565 if ((ibm_phandle = get_property(node, "ibm,phandle", NULL))) 1565 if ((ibm_phandle = of_get_property(node, "ibm,phandle", NULL)))
1566 node->linux_phandle = *ibm_phandle; 1566 node->linux_phandle = *ibm_phandle;
1567 1567
1568out: 1568out:
@@ -1625,13 +1625,13 @@ EXPORT_SYMBOL(of_find_property);
1625 * Find a property with a given name for a given node 1625 * Find a property with a given name for a given node
1626 * and return the value. 1626 * and return the value.
1627 */ 1627 */
1628const void *get_property(const struct device_node *np, const char *name, 1628const void *of_get_property(const struct device_node *np, const char *name,
1629 int *lenp) 1629 int *lenp)
1630{ 1630{
1631 struct property *pp = of_find_property(np,name,lenp); 1631 struct property *pp = of_find_property(np,name,lenp);
1632 return pp ? pp->value : NULL; 1632 return pp ? pp->value : NULL;
1633} 1633}
1634EXPORT_SYMBOL(get_property); 1634EXPORT_SYMBOL(of_get_property);
1635 1635
1636/* 1636/*
1637 * Add a property to a node 1637 * Add a property to a node
@@ -1762,10 +1762,10 @@ struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
1762 /* Check for ibm,ppc-interrupt-server#s. If it doesn't exist 1762 /* Check for ibm,ppc-interrupt-server#s. If it doesn't exist
1763 * fallback to "reg" property and assume no threads 1763 * fallback to "reg" property and assume no threads
1764 */ 1764 */
1765 intserv = get_property(np, "ibm,ppc-interrupt-server#s", 1765 intserv = of_get_property(np, "ibm,ppc-interrupt-server#s",
1766 &plen); 1766 &plen);
1767 if (intserv == NULL) { 1767 if (intserv == NULL) {
1768 const u32 *reg = get_property(np, "reg", NULL); 1768 const u32 *reg = of_get_property(np, "reg", NULL);
1769 if (reg == NULL) 1769 if (reg == NULL)
1770 continue; 1770 continue;
1771 if (*reg == hardid) { 1771 if (*reg == hardid) {