aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/windfarm_lm87_sensor.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh/windfarm_lm87_sensor.c')
-rw-r--r--drivers/macintosh/windfarm_lm87_sensor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/macintosh/windfarm_lm87_sensor.c b/drivers/macintosh/windfarm_lm87_sensor.c
index 35aa571d498a..09724acd70b6 100644
--- a/drivers/macintosh/windfarm_lm87_sensor.c
+++ b/drivers/macintosh/windfarm_lm87_sensor.c
@@ -110,8 +110,8 @@ static int wf_lm87_probe(struct i2c_client *client,
* the Xserve G5 has several lm87's. However, for now we only
* care about the internal temperature sensor
*/
- while ((np = of_get_next_child(client->dev.of_node, np)) != NULL) {
- if (strcmp(np->name, "int-temp"))
+ for_each_child_of_node(client->dev.of_node, np) {
+ if (!of_node_name_eq(np, "int-temp"))
continue;
loc = of_get_property(np, "location", NULL);
if (!loc)