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>
This commit is contained in:
committed by
Grant Likely
parent
ef2a4524d6
commit
035ebefc73
@ -70,6 +70,11 @@ extern struct device_node *allnodes;
|
||||
extern struct device_node *of_chosen;
|
||||
extern rwlock_t devtree_lock;
|
||||
|
||||
static inline bool of_node_is_root(const struct device_node *node)
|
||||
{
|
||||
return node && (node->parent == NULL);
|
||||
}
|
||||
|
||||
static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
|
||||
{
|
||||
return test_bit(flag, &n->_flags);
|
||||
|
||||
Reference in New Issue
Block a user