diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-02-15 22:38:40 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-02-21 15:33:00 -0500 |
commit | 0f22dd395fc473cee252b9af50249b8e0f32fde7 (patch) | |
tree | 680ec5999048bd79f665ddeaa8bcaa259ee53ed7 /drivers/of | |
parent | 5411972995b27a9074062b6d8e106fc15bd1cd44 (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 'drivers/of')
-rw-r--r-- | drivers/of/Kconfig | 5 | ||||
-rw-r--r-- | drivers/of/base.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index 268163dd71c7..6ea51dcbc728 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig | |||
@@ -35,9 +35,10 @@ config OF_EARLY_FLATTREE | |||
35 | config OF_PROMTREE | 35 | config OF_PROMTREE |
36 | bool | 36 | bool |
37 | 37 | ||
38 | # Hardly any platforms need this. It is safe to select, but only do so if you | ||
39 | # need it. | ||
38 | config OF_DYNAMIC | 40 | config OF_DYNAMIC |
39 | def_bool y | 41 | bool |
40 | depends on PPC_OF | ||
41 | 42 | ||
42 | config OF_ADDRESS | 43 | config OF_ADDRESS |
43 | def_bool y | 44 | def_bool y |
diff --git a/drivers/of/base.c b/drivers/of/base.c index 13ba72875e25..580644986945 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -88,7 +88,7 @@ int of_n_size_cells(struct device_node *np) | |||
88 | } | 88 | } |
89 | EXPORT_SYMBOL(of_n_size_cells); | 89 | EXPORT_SYMBOL(of_n_size_cells); |
90 | 90 | ||
91 | #if !defined(CONFIG_SPARC) /* SPARC doesn't do ref counting (yet) */ | 91 | #if defined(CONFIG_OF_DYNAMIC) |
92 | /** | 92 | /** |
93 | * of_node_get - Increment refcount of a node | 93 | * of_node_get - Increment refcount of a node |
94 | * @node: Node to inc refcount, NULL is supported to | 94 | * @node: Node to inc refcount, NULL is supported to |
@@ -161,7 +161,7 @@ void of_node_put(struct device_node *node) | |||
161 | kref_put(&node->kref, of_node_release); | 161 | kref_put(&node->kref, of_node_release); |
162 | } | 162 | } |
163 | EXPORT_SYMBOL(of_node_put); | 163 | EXPORT_SYMBOL(of_node_put); |
164 | #endif /* !CONFIG_SPARC */ | 164 | #endif /* CONFIG_OF_DYNAMIC */ |
165 | 165 | ||
166 | struct property *of_find_property(const struct device_node *np, | 166 | struct property *of_find_property(const struct device_node *np, |
167 | const char *name, | 167 | const char *name, |