summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/Kconfig5
-rw-r--r--drivers/of/base.c4
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
config OF_PROMTREE
bool
+# Hardly any platforms need this. It is safe to select, but only do so if you
+# need it.
config OF_DYNAMIC
- def_bool y
- depends on PPC_OF
+ bool
config OF_ADDRESS
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)
}
EXPORT_SYMBOL(of_n_size_cells);
-#if !defined(CONFIG_SPARC) /* SPARC doesn't do ref counting (yet) */
+#if defined(CONFIG_OF_DYNAMIC)
/**
* of_node_get - Increment refcount of a node
* @node: Node to inc refcount, NULL is supported to
@@ -161,7 +161,7 @@ void of_node_put(struct device_node *node)
kref_put(&node->kref, of_node_release);
}
EXPORT_SYMBOL(of_node_put);
-#endif /* !CONFIG_SPARC */
+#endif /* CONFIG_OF_DYNAMIC */
struct property *of_find_property(const struct device_node *np,
const char *name,