Thread (16 messages) flat view 16 messages, 6 authors, 2008-01-18

Re: [PATCH 3/3] USB device tree cleanups

From: Stephen Rothwell <hidden>
Date: 2008-01-07 23:10:39

On Mon,  7 Jan 2008 20:03:20 +0800 Li Yang [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -533,9 +533,7 @@ static int __init fsl_usb_of_init(void)
 		*usb_dev_dr_client = NULL;
 	int ret;
 
-	for (np = NULL, i = 0;
-	     (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL;
-	     i++) {
+	for_each_compatible_node(np, NULL, "fsl-usb2-mph") {
'i' is no longer being updated (or indeed set to anything) but is still
used in the loop - at least in Paulus' current tree).
quoted hunk ↗ jump to hunk
 		struct resource r[2];
 		struct fsl_usb2_platform_data usb_data;
 		const unsigned char *prop = NULL;
@@ -580,9 +578,7 @@ static int __init fsl_usb_of_init(void)
 			goto unreg_mph;
 	}
 
-	for (np = NULL;
-	     (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL;
-	     i++) {
+	for_each_compatible_node(np, NULL, "fsl-usb2-dr") {
Same here.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help