diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2007-11-29 14:45:47 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-01-16 22:56:55 -0500 |
commit | 3329c0d1b2de2eb9e156aa8c13ad639f54791f24 (patch) | |
tree | fd0119bd83abd0bdd870e721ab7fee9f7cb15b9c /arch/powerpc/kernel/legacy_serial.c | |
parent | 26cb7d8bbddc8338904b8810b860ccf052c761fa (diff) |
[POWERPC] Use for_each macros in arch/powerpc/kernel
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/legacy_serial.c')
-rw-r--r-- | arch/powerpc/kernel/legacy_serial.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index b9cae6b1f8ca..4bfff8863bcb 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c | |||
@@ -307,7 +307,7 @@ void __init find_legacy_serial_ports(void) | |||
307 | } | 307 | } |
308 | 308 | ||
309 | /* First fill our array with SOC ports */ | 309 | /* First fill our array with SOC ports */ |
310 | for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) { | 310 | for_each_compatible_node(np, "serial", "ns16550") { |
311 | struct device_node *soc = of_get_parent(np); | 311 | struct device_node *soc = of_get_parent(np); |
312 | if (soc && !strcmp(soc->type, "soc")) { | 312 | if (soc && !strcmp(soc->type, "soc")) { |
313 | index = add_legacy_soc_port(np, np); | 313 | index = add_legacy_soc_port(np, np); |
@@ -318,7 +318,7 @@ void __init find_legacy_serial_ports(void) | |||
318 | } | 318 | } |
319 | 319 | ||
320 | /* First fill our array with ISA ports */ | 320 | /* First fill our array with ISA ports */ |
321 | for (np = NULL; (np = of_find_node_by_type(np, "serial"));) { | 321 | for_each_node_by_type(np, "serial") { |
322 | struct device_node *isa = of_get_parent(np); | 322 | struct device_node *isa = of_get_parent(np); |
323 | if (isa && !strcmp(isa->name, "isa")) { | 323 | if (isa && !strcmp(isa->name, "isa")) { |
324 | index = add_legacy_isa_port(np, isa); | 324 | index = add_legacy_isa_port(np, isa); |
@@ -329,7 +329,7 @@ void __init find_legacy_serial_ports(void) | |||
329 | } | 329 | } |
330 | 330 | ||
331 | /* First fill our array with tsi-bridge ports */ | 331 | /* First fill our array with tsi-bridge ports */ |
332 | for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) { | 332 | for_each_compatible_node(np, "serial", "ns16550") { |
333 | struct device_node *tsi = of_get_parent(np); | 333 | struct device_node *tsi = of_get_parent(np); |
334 | if (tsi && !strcmp(tsi->type, "tsi-bridge")) { | 334 | if (tsi && !strcmp(tsi->type, "tsi-bridge")) { |
335 | index = add_legacy_soc_port(np, np); | 335 | index = add_legacy_soc_port(np, np); |
@@ -340,7 +340,7 @@ void __init find_legacy_serial_ports(void) | |||
340 | } | 340 | } |
341 | 341 | ||
342 | /* First fill our array with opb bus ports */ | 342 | /* First fill our array with opb bus ports */ |
343 | for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) { | 343 | for_each_compatible_node(np, "serial", "ns16550") { |
344 | struct device_node *opb = of_get_parent(np); | 344 | struct device_node *opb = of_get_parent(np); |
345 | if (opb && (!strcmp(opb->type, "opb") || | 345 | if (opb && (!strcmp(opb->type, "opb") || |
346 | of_device_is_compatible(opb, "ibm,opb"))) { | 346 | of_device_is_compatible(opb, "ibm,opb"))) { |