[POWERPC] Use for_each macros in arch/powerpc/sysdev

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Cyrill Gorcunov
2007-11-30 06:44:36 +11:00
committed by Paul Mackerras
parent 283029d16a
commit 26cb7d8bbd
6 changed files with 25 additions and 38 deletions

View File

@@ -1128,13 +1128,12 @@ arch_initcall(fs_enet_of_init);
static int __init fsl_pcmcia_of_init(void)
{
struct device_node *np = NULL;
struct device_node *np;
/*
* Register all the devices which type is "pcmcia"
*/
while ((np = of_find_compatible_node(np,
"pcmcia", "fsl,pq-pcmcia")) != NULL)
of_platform_device_create(np, "m8xx-pcmcia", NULL);
for_each_compatible_node(np, "pcmcia", "fsl,pq-pcmcia")
of_platform_device_create(np, "m8xx-pcmcia", NULL);
return 0;
}