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/