aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2010-07-13 09:42:26 +0000
committerGrant Likely <grant.likely@secretlab.ca>2010-07-14 17:08:03 -0600
commit035ebefc737cce56d3938e9b7eaa5ac0e9c28715 (patch)
tree37593760f4411ec3d3db9b46e2b9a21255624549 /arch/sparc
parentef2a4524d6e776bbce819eeccbdcaeee5ce74027 (diff)
of/sparc: move is_root_node() to of.h
Rename is_root_node() to of_node_is_root() and make it available for all archs to use, as it's not PROM-specific. Signed-off-by: Andres Salomon <dilinger@queued.net> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/prom.h8
-rw-r--r--arch/sparc/kernel/prom_64.c6
-rw-r--r--arch/sparc/kernel/prom_common.c2
3 files changed, 4 insertions, 12 deletions
diff --git a/arch/sparc/kernel/prom.h b/arch/sparc/kernel/prom.h
index a8591ef2636..eeb04a782ec 100644
--- a/arch/sparc/kernel/prom.h
+++ b/arch/sparc/kernel/prom.h
@@ -9,14 +9,6 @@ extern void irq_trans_init(struct device_node *dp);
extern unsigned int prom_unique_id;
-static inline int is_root_node(const struct device_node *dp)
-{
- if (!dp)
- return 0;
-
- return (dp->parent == NULL);
-}
-
extern char *build_path_component(struct device_node *dp);
extern void of_console_init(void);
diff --git a/arch/sparc/kernel/prom_64.c b/arch/sparc/kernel/prom_64.c
index fb06ac2bd38..0bffafdee35 100644
--- a/arch/sparc/kernel/prom_64.c
+++ b/arch/sparc/kernel/prom_64.c
@@ -21,7 +21,7 @@
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/lmb.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
#include <asm/prom.h>
#include <asm/oplib.h>
@@ -81,7 +81,7 @@ static void __init sun4v_path_component(struct device_node *dp, char *tmp_buf)
return;
regs = rprop->value;
- if (!is_root_node(dp->parent)) {
+ if (!of_node_is_root(dp->parent)) {
sprintf(tmp_buf, "%s@%x,%x",
dp->name,
(unsigned int) (regs->phys_addr >> 32UL),
@@ -121,7 +121,7 @@ static void __init sun4u_path_component(struct device_node *dp, char *tmp_buf)
return;
regs = prop->value;
- if (!is_root_node(dp->parent)) {
+ if (!of_node_is_root(dp->parent)) {
sprintf(tmp_buf, "%s@%x,%x",
dp->name,
(unsigned int) (regs->phys_addr >> 32UL),
diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c
index 57ac9e28be0..1f830da2ddf 100644
--- a/arch/sparc/kernel/prom_common.c
+++ b/arch/sparc/kernel/prom_common.c
@@ -244,7 +244,7 @@ char * __init build_full_name(struct device_node *dp)
n = prom_early_alloc(len);
strcpy(n, dp->parent->full_name);
- if (!is_root_node(dp->parent)) {
+ if (!of_node_is_root(dp->parent)) {
strcpy(n + plen, "/");
plen++;
}