diff options
author | Andres Salomon <dilinger@queued.net> | 2010-07-13 05:42:26 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-14 19:08:03 -0400 |
commit | 035ebefc737cce56d3938e9b7eaa5ac0e9c28715 (patch) | |
tree | 37593760f4411ec3d3db9b46e2b9a21255624549 /include | |
parent | ef2a4524d6e776bbce819eeccbdcaeee5ce74027 (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 'include')
-rw-r--r-- | include/linux/of.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index a367e19bb3af..b0756f33249e 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -70,6 +70,11 @@ extern struct device_node *allnodes; | |||
70 | extern struct device_node *of_chosen; | 70 | extern struct device_node *of_chosen; |
71 | extern rwlock_t devtree_lock; | 71 | extern rwlock_t devtree_lock; |
72 | 72 | ||
73 | static inline bool of_node_is_root(const struct device_node *node) | ||
74 | { | ||
75 | return node && (node->parent == NULL); | ||
76 | } | ||
77 | |||
73 | static inline int of_node_check_flag(struct device_node *n, unsigned long flag) | 78 | static inline int of_node_check_flag(struct device_node *n, unsigned long flag) |
74 | { | 79 | { |
75 | return test_bit(flag, &n->_flags); | 80 | return test_bit(flag, &n->_flags); |