Thread (25 messages) 25 messages, 6 authors, 2011-02-25
STALE5575d

[PATCH 1/3] of: define dummy of_get_property if not CONFIG_OF

From: Thomas Chou <hidden>
Date: 2011-01-31 15:26:00
Also in: linux-i2c, lkml
Subsystem: open firmware and flattened device tree, the rest · Maintainers: Rob Herring, Saravana Kannan, Linus Torvalds

This will help to reduce the ifdef CONFIG_OF needed in most
platform data probing.

Signed-off-by: Thomas Chou <redacted>
---
 include/linux/of.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index cad7cf0..5e122cb 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -222,5 +222,13 @@ extern void of_attach_node(struct device_node *);
 extern void of_detach_node(struct device_node *);
 #endif
 
+#else /* !CONFIG_OF */
+
+static inline const void *of_get_property(const struct device_node *node,
+				const char *name, int *lenp)
+{
+	return NULL;
+}
+
 #endif /* CONFIG_OF */
 #endif /* _LINUX_OF_H */
-- 
1.7.3.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help