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>
This commit is contained in:
@@ -29,20 +29,6 @@ static struct device_node *allnodes;
|
||||
|
||||
extern rwlock_t devtree_lock; /* temporary while merging */
|
||||
|
||||
struct device_node *of_get_next_child(const struct device_node *node,
|
||||
struct device_node *prev)
|
||||
{
|
||||
struct device_node *next;
|
||||
|
||||
next = prev ? prev->sibling : node->child;
|
||||
for (; next != 0; next = next->sibling) {
|
||||
break;
|
||||
}
|
||||
|
||||
return next;
|
||||
}
|
||||
EXPORT_SYMBOL(of_get_next_child);
|
||||
|
||||
struct device_node *of_find_node_by_path(const char *path)
|
||||
{
|
||||
struct device_node *np = allnodes;
|
||||
|
Reference in New Issue
Block a user