From 55e25a4b1367e547378008fd93b52908d00ca46f Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 13 Dec 2011 09:13:54 -0600 Subject: [PATCH] --- yaml --- r: 280134 b: refs/heads/master c: 3ecdd0515287afbcde352077d59e4028dcfbb685 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/of.h | 29 ++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index e59dd2d6b6e3..9e5866c9143f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 75c71848f22e6381f48614da23df2a43e374b498 +refs/heads/master: 3ecdd0515287afbcde352077d59e4028dcfbb685 diff --git a/trunk/include/linux/of.h b/trunk/include/linux/of.h index f1a490c37e06..9abd3ec3c2ac 100644 --- a/trunk/include/linux/of.h +++ b/trunk/include/linux/of.h @@ -65,6 +65,20 @@ struct device_node { #endif }; +#if defined(CONFIG_SPARC) || !defined(CONFIG_OF) +/* Dummy ref counting routines - to be implemented later */ +static inline struct device_node *of_node_get(struct device_node *node) +{ + return node; +} +static inline void of_node_put(struct device_node *node) +{ +} +#else +extern struct device_node *of_node_get(struct device_node *node); +extern void of_node_put(struct device_node *node); +#endif + #ifdef CONFIG_OF /* 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) extern struct device_node *of_find_all_nodes(struct device_node *prev); -#if defined(CONFIG_SPARC) -/* Dummy ref counting routines - to be implemented later */ -static inline struct device_node *of_node_get(struct device_node *node) -{ - return node; -} -static inline void of_node_put(struct device_node *node) -{ -} - -#else -extern struct device_node *of_node_get(struct device_node *node); -extern void of_node_put(struct device_node *node); -#endif - /* * OF address retrieval & translation */