From 85e99b9fffb62e101e38c74c935256fc589703c2 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 3 Jan 2008 15:13:37 +1100 Subject: [POWERPC] arch/powerpc/kernel: Use for_each_child_of_node Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/of_platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/powerpc/kernel/of_platform.c') diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index 7a3cafbe8af9..fb698d47082d 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c @@ -109,7 +109,7 @@ static int of_platform_bus_create(const struct device_node *bus, struct of_device *dev; int rc = 0; - for (child = NULL; (child = of_get_next_child(bus, child)); ) { + for_each_child_of_node(bus, child) { pr_debug(" create child: %s\n", child->full_name); dev = of_platform_device_create(child, NULL, parent); if (dev == NULL) @@ -171,7 +171,7 @@ int of_platform_bus_probe(struct device_node *root, rc = of_platform_bus_create(root, matches, &dev->dev); goto bail; } - for (child = NULL; (child = of_get_next_child(root, child)); ) { + for_each_child_of_node(root, child) { if (!of_match_node(matches, child)) continue; -- cgit v1.2.3-59-g8ed1b