[PATCH v3 06/10] OF: base: use of_platform_populate for probing

Sebastian Hesselbarth sebastian.hesselbarth at gmail.com
Tue Jul 2 14:14:35 EDT 2013


With recent bus/device related functions in OF API, we can now
convert to use of_platform_populate.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth at gmail.com>
---
Cc: barebox at lists.infradead.org
---
 drivers/of/base.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 429f924..eb9ac84 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1840,7 +1840,7 @@ const struct of_device_id of_default_bus_match_table[] = {
 
 int of_probe(void)
 {
-	struct device_node *memory, *n;
+	struct device_node *memory;
 
 	if(!root_node)
 		return -ENODEV;
@@ -1854,8 +1854,7 @@ int of_probe(void)
 	if (memory)
 		of_add_memory(memory, false);
 
-	list_for_each_entry(n, &root_node->children, parent_list)
-		__of_probe(n, of_default_bus_match_table, NULL);
+	of_platform_populate(root_node, of_default_bus_match_table, NULL);
 
 	return 0;
 }
-- 
1.7.2.5




More information about the barebox mailing list