summaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-12-05 00:50:22 -0800
committerDavid S. Miller <davem@davemloft.net>2008-12-05 17:03:30 -0800
commite5ff0fe31d69e716f2599bcfb297ca3757e957c5 (patch)
tree5e95cf11acb2ec3f85a40331de0801c578a8029b /arch/sparc
parent5fce09c6f636449d6df971971af1bd4328a21890 (diff)
sparc: Move 'unique_id' into prom_common.c and rename to 'prom_unique_id'
This will be used in a subsequent changeset. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/prom.h2
-rw-r--r--arch/sparc/kernel/prom_32.c6
-rw-r--r--arch/sparc/kernel/prom_64.c6
-rw-r--r--arch/sparc/kernel/prom_common.c1
4 files changed, 7 insertions, 8 deletions
diff --git a/arch/sparc/kernel/prom.h b/arch/sparc/kernel/prom.h
index 49925101f8f..2575cdbbed6 100644
--- a/arch/sparc/kernel/prom.h
+++ b/arch/sparc/kernel/prom.h
@@ -13,4 +13,6 @@ extern void * prom_early_alloc(unsigned long size);
extern void irq_trans_init(struct device_node *dp);
#endif
+extern unsigned int prom_unique_id;
+
#endif /* __PROM_H */
diff --git a/arch/sparc/kernel/prom_32.c b/arch/sparc/kernel/prom_32.c
index ba3c5518682..c34888a21b2 100644
--- a/arch/sparc/kernel/prom_32.c
+++ b/arch/sparc/kernel/prom_32.c
@@ -196,8 +196,6 @@ static char * __init build_full_name(struct device_node *dp)
return n;
}
-static unsigned int unique_id;
-
static struct property * __init build_one_prop(phandle node, char *prev, char *special_name, void *special_val, int special_len)
{
static struct property *tmp = NULL;
@@ -211,7 +209,7 @@ static struct property * __init build_one_prop(phandle node, char *prev, char *s
tmp = NULL;
} else {
p = prom_early_alloc(sizeof(struct property) + 32);
- p->unique_id = unique_id++;
+ p->unique_id = prom_unique_id++;
}
p->name = (char *) (p + 1);
@@ -286,7 +284,7 @@ static struct device_node * __init create_node(phandle node)
return NULL;
dp = prom_early_alloc(sizeof(*dp));
- dp->unique_id = unique_id++;
+ dp->unique_id = prom_unique_id++;
kref_init(&dp->kref);
diff --git a/arch/sparc/kernel/prom_64.c b/arch/sparc/kernel/prom_64.c
index d745b9f44d2..61cc967b149 100644
--- a/arch/sparc/kernel/prom_64.c
+++ b/arch/sparc/kernel/prom_64.c
@@ -399,8 +399,6 @@ static char * __init build_full_name(struct device_node *dp)
return n;
}
-static unsigned int unique_id;
-
static struct property * __init build_one_prop(phandle node, char *prev, char *special_name, void *special_val, int special_len)
{
static struct property *tmp = NULL;
@@ -412,7 +410,7 @@ static struct property * __init build_one_prop(phandle node, char *prev, char *s
tmp = NULL;
} else {
p = prom_early_alloc(sizeof(struct property) + 32);
- p->unique_id = unique_id++;
+ p->unique_id = prom_unique_id++;
}
p->name = (char *) (p + 1);
@@ -483,7 +481,7 @@ static struct device_node * __init create_node(phandle node, struct device_node
return NULL;
dp = prom_early_alloc(sizeof(*dp));
- dp->unique_id = unique_id++;
+ dp->unique_id = prom_unique_id++;
dp->parent = parent;
kref_init(&dp->kref);
diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c
index ded8c628811..a2318080101 100644
--- a/arch/sparc/kernel/prom_common.c
+++ b/arch/sparc/kernel/prom_common.c
@@ -119,3 +119,4 @@ int of_find_in_proplist(const char *list, const char *match, int len)
}
EXPORT_SYMBOL(of_find_in_proplist);
+unsigned int prom_unique_id;