powerpc: Use for_each_node_by_type instead of open coding it
Use for_each_node_by_type instead of open coding it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

zatwierdzone przez
Benjamin Herrenschmidt

rodzic
6083184269
commit
94db7c5e14
@@ -74,8 +74,7 @@ int default_machine_kexec_prepare(struct kimage *image)
|
||||
}
|
||||
|
||||
/* We also should not overwrite the tce tables */
|
||||
for (node = of_find_node_by_type(NULL, "pci"); node != NULL;
|
||||
node = of_find_node_by_type(node, "pci")) {
|
||||
for_each_node_by_type(node, "pci") {
|
||||
basep = of_get_property(node, "linux,tce-base", NULL);
|
||||
sizep = of_get_property(node, "linux,tce-size", NULL);
|
||||
if (basep == NULL || sizep == NULL)
|
||||
|
@@ -278,7 +278,7 @@ static void __init initialize_cache_info(void)
|
||||
|
||||
DBG(" -> initialize_cache_info()\n");
|
||||
|
||||
for (np = NULL; (np = of_find_node_by_type(np, "cpu"));) {
|
||||
for_each_node_by_type(np, "cpu") {
|
||||
num_cpus += 1;
|
||||
|
||||
/* We're assuming *all* of the CPUs have the same
|
||||
|
Reference in New Issue
Block a user