diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-04-24 03:21:29 -0400 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-07-19 23:34:26 -0400 |
commit | d1cd355a5e44dfe993efc0c0458ca9f99a28a9a3 (patch) | |
tree | 9bcc28338f70b8c3c5076f2dbf0a8d3ce551f0b8 /arch/sparc64 | |
parent | e679c5f445fe142940e0962de9c5c82f10d9357c (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/sparc64')
-rw-r--r-- | arch/sparc64/kernel/prom.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index 2462731ac1a3..ee96ef61bc99 100644 --- a/arch/sparc64/kernel/prom.c +++ b/arch/sparc64/kernel/prom.c | |||
@@ -34,20 +34,6 @@ static struct device_node *allnodes; | |||
34 | 34 | ||
35 | extern rwlock_t devtree_lock; /* temporary while merging */ | 35 | extern rwlock_t devtree_lock; /* temporary while merging */ |
36 | 36 | ||
37 | struct device_node *of_get_next_child(const struct device_node *node, | ||
38 | struct device_node *prev) | ||
39 | { | ||
40 | struct device_node *next; | ||
41 | |||
42 | next = prev ? prev->sibling : node->child; | ||
43 | for (; next != 0; next = next->sibling) { | ||
44 | break; | ||
45 | } | ||
46 | |||
47 | return next; | ||
48 | } | ||
49 | EXPORT_SYMBOL(of_get_next_child); | ||
50 | |||
51 | struct device_node *of_find_node_by_path(const char *path) | 37 | struct device_node *of_find_node_by_path(const char *path) |
52 | { | 38 | { |
53 | struct device_node *np = allnodes; | 39 | struct device_node *np = allnodes; |