aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2011-12-13 10:13:54 -0500
committerRob Herring <rob.herring@calxeda.com>2011-12-28 09:24:33 -0500
commit3ecdd0515287afbcde352077d59e4028dcfbb685 (patch)
treef377aa635f817a69eb449d377af660c38b50c3a3 /include/linux/of.h
parent75c71848f22e6381f48614da23df2a43e374b498 (diff)
dt: add empty of_get_node/of_put_node functions
Add empty of_get_node/of_put_node functions for !CONFIG_OF builds. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index f1a490c37e06..9abd3ec3c2ac 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -65,6 +65,20 @@ struct device_node {
65#endif 65#endif
66}; 66};
67 67
68#if defined(CONFIG_SPARC) || !defined(CONFIG_OF)
69/* Dummy ref counting routines - to be implemented later */
70static inline struct device_node *of_node_get(struct device_node *node)
71{
72 return node;
73}
74static inline void of_node_put(struct device_node *node)
75{
76}
77#else
78extern struct device_node *of_node_get(struct device_node *node);
79extern void of_node_put(struct device_node *node);
80#endif
81
68#ifdef CONFIG_OF 82#ifdef CONFIG_OF
69 83
70/* Pointer for first entry in chain of all nodes. */ 84/* Pointer for first entry in chain of all nodes. */
@@ -95,21 +109,6 @@ static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
95 109
96extern struct device_node *of_find_all_nodes(struct device_node *prev); 110extern struct device_node *of_find_all_nodes(struct device_node *prev);
97 111
98#if defined(CONFIG_SPARC)
99/* Dummy ref counting routines - to be implemented later */
100static inline struct device_node *of_node_get(struct device_node *node)
101{
102 return node;
103}
104static inline void of_node_put(struct device_node *node)
105{
106}
107
108#else
109extern struct device_node *of_node_get(struct device_node *node);
110extern void of_node_put(struct device_node *node);
111#endif
112
113/* 112/*
114 * OF address retrieval & translation 113 * OF address retrieval & translation
115 */ 114 */