diff mbox

[v3,06/13] dt: add empty for_each_child_of_node, of_find_property

Message ID 1314315824-9687-7-git-send-email-swarren@nvidia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Stephen Warren Aug. 25, 2011, 11:43 p.m. UTC
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>
---
 include/linux/of.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

Comments

Stephen Warren Aug. 31, 2011, 6:25 p.m. UTC | #1
Stephen Warren wrote at Thursday, August 25, 2011 5:44 PM:
> 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>

Grant, is there any chance you could apply this one patch without waiting
for the whole series; I just realized that the SDHCI controller changes
I published yesterday rely on this patch to compile. While I did compile-
check them without CONFIG_OF, I also had this patch in that branch and
didn't notice the problem.

Thanks.
diff mbox

Patch

diff --git a/include/linux/of.h b/include/linux/of.h
index 9180dc5..1fc5875 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -242,6 +242,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)