summaryrefslogtreecommitdiff
path: root/drivers/macintosh/windfarm_rm31.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-12-02 07:00:09 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-01-10 10:00:36 +0400
commitc7c360eedb8c1eea302a224a8c83d19a4e4cf608 (patch)
treecb979c49278a8ede23a411be75fd3bd4df7369ab /drivers/macintosh/windfarm_rm31.c
parente253ebab935693cc2eafbc93e94b68b47dc779db (diff)
downloadlinux-c7c360eedb8c1eea302a224a8c83d19a4e4cf608.tar.xz
powerpc/windfarm: Use for_each_node_by_type() macro
Use for_each_node_by_type() macro instead of open coding it. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/macintosh/windfarm_rm31.c')
-rw-r--r--drivers/macintosh/windfarm_rm31.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/macintosh/windfarm_rm31.c b/drivers/macintosh/windfarm_rm31.c
index 844003fb4ef0..0b9a79b2f48a 100644
--- a/drivers/macintosh/windfarm_rm31.c
+++ b/drivers/macintosh/windfarm_rm31.c
@@ -696,7 +696,7 @@ static int __init wf_rm31_init(void)
/* Count the number of CPU cores */
nr_chips = 0;
- for (cpu = NULL; (cpu = of_find_node_by_type(cpu, "cpu")) != NULL; )
+ for_each_node_by_type(cpu, "cpu")
++nr_chips;
if (nr_chips > NR_CHIPS)
nr_chips = NR_CHIPS;