lkml.org 
[lkml]   [2012]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH RFC 02/13] of: add a dummy inline function for when CONFIG_OF is not defined
Date
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

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 <g.liakhovetski@gmx.de>
---
include/linux/of.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/of.h b/include/linux/of.h
index b4e50d5..9ba8cf1 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -427,6 +427,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.9.5


\
 
 \ /
  Last update: 2012-12-11 03:21    [W:0.113 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site