diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-09-21 15:23:10 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-09-22 13:29:17 -0400 |
commit | aba3dfff9a75eb272c4f47994f16eb5d548a5af1 (patch) | |
tree | e08de185c0df946a3932f2e65a24835961bb7798 /include/linux/of.h | |
parent | 987bfad6429aa3aefbc196bd0fc90fc48409a87b (diff) |
dt: add empty for_each_child_of_node, of_find_property
The patch adds a couple empty functions for non-dt build, so that
drivers migrating to dt can save some '#ifdef CONFIG_OF'.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
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 8b6383d876ca..83a61f3b443c 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -249,6 +249,16 @@ static inline bool of_have_populated_dt(void) | |||
249 | return false; | 249 | return false; |
250 | } | 250 | } |
251 | 251 | ||
252 | #define for_each_child_of_node(parent, child) \ | ||
253 | while (0) | ||
254 | |||
255 | static inline struct property *of_find_property(const struct device_node *np, | ||
256 | const char *name, | ||
257 | int *lenp) | ||
258 | { | ||
259 | return NULL; | ||
260 | } | ||
261 | |||
252 | static inline int of_property_read_u32_array(const struct device_node *np, | 262 | static inline int of_property_read_u32_array(const struct device_node *np, |
253 | const char *propname, | 263 | const char *propname, |
254 | u32 *out_values, size_t sz) | 264 | u32 *out_values, size_t sz) |