Thread (22 messages) 22 messages, 6 authors, 2013-04-10
STALE4806d

[PATCH 02/14] of: add a dummy inline function for when CONFIG_OF is not defined

From: Guennadi Liakhovetski <hidden>
Date: 2012-09-27 14:07:21
Also in: linux-sh
Subsystem: open firmware and flattened device tree, the rest · Maintainers: Rob Herring, Saravana Kannan, Linus Torvalds

If CONFIG_OF isn't defined, no declaration of of_get_parent will be found
and compilation can fail. This patch adds a dummy inline function
definition to fix the problem.

Signed-off-by: Guennadi Liakhovetski <redacted>
---
 include/linux/of.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index 1b11632..54866e6 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -412,6 +412,11 @@ static inline int of_parse_phandle_with_args(struct device_node *np,
 	return -ENOSYS;
 }
 
+static inline struct device_node *of_get_parent(const struct device_node *np)
+{
+	return NULL;
+}
+
 static inline int of_alias_get_id(struct device_node *np, const char *stem)
 {
 	return -ENOSYS;
-- 
1.7.2.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