diff options
| author | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-06 18:37:02 +0400 | 
|---|---|---|
| committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-06 18:37:02 +0400 | 
| commit | ab11b487402f97975f3ac1eeea09c82f4431481e (patch) | |
| tree | 86337c5cbbd2b0c4bd07c0847a1dc7de3d898147 /include/linux/of.h | |
| parent | 1c689cbcf2c2b7a35cd237abddd9206bb1b6fee1 (diff) | |
| parent | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff) | |
| download | linux-ab11b487402f97975f3ac1eeea09c82f4431481e.tar.xz | |
Merge branch 'master' into for-linus
Diffstat (limited to 'include/linux/of.h')
| -rw-r--r-- | include/linux/of.h | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index a367e19bb3af..cad7cf0ab278 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -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); @@ -141,6 +146,11 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)  #define OF_BAD_ADDR	((u64)-1) +#ifndef of_node_to_nid +static inline int of_node_to_nid(struct device_node *np) { return -1; } +#define of_node_to_nid of_node_to_nid +#endif +  extern struct device_node *of_find_node_by_name(struct device_node *from,  	const char *name);  #define for_each_node_by_name(dn, name) \  | 
