aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-24 03:21:29 -0400
committerStephen Rothwell <sfr@canb.auug.org.au>2007-07-19 23:34:26 -0400
commitd1cd355a5e44dfe993efc0c0458ca9f99a28a9a3 (patch)
tree9bcc28338f70b8c3c5076f2dbf0a8d3ce551f0b8 /arch/sparc
parente679c5f445fe142940e0962de9c5c82f10d9357c (diff)
Consolidate of_get_next_child
This adds a read_lock around the child/next accesses on Sparc. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/prom.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/arch/sparc/kernel/prom.c b/arch/sparc/kernel/prom.c
index b37871578087..3f8ccfad2e01 100644
--- a/arch/sparc/kernel/prom.c
+++ b/arch/sparc/kernel/prom.c
@@ -29,20 +29,6 @@ static struct device_node *allnodes;
29 29
30extern rwlock_t devtree_lock; /* temporary while merging */ 30extern rwlock_t devtree_lock; /* temporary while merging */
31 31
32struct device_node *of_get_next_child(const struct device_node *node,
33 struct device_node *prev)
34{
35 struct device_node *next;
36
37 next = prev ? prev->sibling : node->child;
38 for (; next != 0; next = next->sibling) {
39 break;
40 }
41
42 return next;
43}
44EXPORT_SYMBOL(of_get_next_child);
45
46struct device_node *of_find_node_by_path(const char *path) 32struct device_node *of_find_node_by_path(const char *path)
47{ 33{
48 struct device_node *np = allnodes; 34 struct device_node *np = allnodes;