diff options
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index e6f0988c1c68..fa362867b453 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -130,6 +130,12 @@ static inline int of_node_check_flag(struct device_node *n, unsigned long flag) | |||
130 | return test_bit(flag, &n->_flags); | 130 | return test_bit(flag, &n->_flags); |
131 | } | 131 | } |
132 | 132 | ||
133 | static inline int of_node_test_and_set_flag(struct device_node *n, | ||
134 | unsigned long flag) | ||
135 | { | ||
136 | return test_and_set_bit(flag, &n->_flags); | ||
137 | } | ||
138 | |||
133 | static inline void of_node_set_flag(struct device_node *n, unsigned long flag) | 139 | static inline void of_node_set_flag(struct device_node *n, unsigned long flag) |
134 | { | 140 | { |
135 | set_bit(flag, &n->_flags); | 141 | set_bit(flag, &n->_flags); |
@@ -197,6 +203,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) | |||
197 | /* flag descriptions */ | 203 | /* flag descriptions */ |
198 | #define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ | 204 | #define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ |
199 | #define OF_DETACHED 2 /* node has been detached from the device tree */ | 205 | #define OF_DETACHED 2 /* node has been detached from the device tree */ |
206 | #define OF_POPULATED 3 /* device already created for the node */ | ||
200 | 207 | ||
201 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | 208 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) |
202 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | 209 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) |