From aba3dfff9a75eb272c4f47994f16eb5d548a5af1 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 21 Sep 2011 13:23:10 -0600 Subject: [PATCH] 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 Signed-off-by: Grant Likely --- include/linux/of.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) return false; } +#define for_each_child_of_node(parent, child) \ + while (0) + +static inline struct property *of_find_property(const struct device_node *np, + const char *name, + int *lenp) +{ + return NULL; +} + static inline int of_property_read_u32_array(const struct device_node *np, const char *propname, u32 *out_values, size_t sz) -- 2.39.5