aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-02-15 22:38:40 -0500
committerGrant Likely <grant.likely@secretlab.ca>2012-02-21 15:33:00 -0500
commit0f22dd395fc473cee252b9af50249b8e0f32fde7 (patch)
tree680ec5999048bd79f665ddeaa8bcaa259ee53ed7 /include/linux/of.h
parent5411972995b27a9074062b6d8e106fc15bd1cd44 (diff)
of: Only compile OF_DYNAMIC on PowerPC pseries and iseries
Only two architectures use the OF node reference counting and reclaim bits. There is no need to compile it for the rest of the PowerPC platforms or for any of the other architectures. This patch makes iseries and pseries select CONFIG_OF_DYNAMIC, and makes it default to off for everything else. It is still safe to turn on CONFIG_OF_DYNAMIC on all architectures, it just isn't necessary. v2: Also select OF_DYNAMIC for PPC_CHROMA and MPC885ADS as reported by Michael Meuling Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Jimi Xenidis <jimix@pobox.com> (for PPC_CHROMA bug fix) Cc: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 5a4a3adb17e5..533603e26b9b 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -72,19 +72,17 @@ struct of_phandle_args {
72 uint32_t args[MAX_PHANDLE_ARGS]; 72 uint32_t args[MAX_PHANDLE_ARGS];
73}; 73};
74 74
75#if defined(CONFIG_SPARC) || !defined(CONFIG_OF) 75#ifdef CONFIG_OF_DYNAMIC
76extern struct device_node *of_node_get(struct device_node *node);
77extern void of_node_put(struct device_node *node);
78#else /* CONFIG_OF_DYNAMIC */
76/* Dummy ref counting routines - to be implemented later */ 79/* Dummy ref counting routines - to be implemented later */
77static inline struct device_node *of_node_get(struct device_node *node) 80static inline struct device_node *of_node_get(struct device_node *node)
78{ 81{
79 return node; 82 return node;
80} 83}
81static inline void of_node_put(struct device_node *node) 84static inline void of_node_put(struct device_node *node) { }
82{ 85#endif /* !CONFIG_OF_DYNAMIC */
83}
84#else
85extern struct device_node *of_node_get(struct device_node *node);
86extern void of_node_put(struct device_node *node);
87#endif
88 86
89#ifdef CONFIG_OF 87#ifdef CONFIG_OF
90 88