aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ofpart.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ofpart.c')
-rw-r--r--drivers/mtd/ofpart.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
index 7843a4491217..d64f8c30945f 100644
--- a/drivers/mtd/ofpart.c
+++ b/drivers/mtd/ofpart.c
@@ -43,9 +43,8 @@ static int parse_ofpart_partitions(struct mtd_info *master,
43 return 0; 43 return 0;
44 44
45 /* First count the subnodes */ 45 /* First count the subnodes */
46 pp = NULL;
47 nr_parts = 0; 46 nr_parts = 0;
48 while ((pp = of_get_next_child(node, pp))) { 47 for_each_child_of_node(node, pp) {
49 if (node_has_compatible(pp)) 48 if (node_has_compatible(pp))
50 continue; 49 continue;
51 50
@@ -59,9 +58,8 @@ static int parse_ofpart_partitions(struct mtd_info *master,
59 if (!*pparts) 58 if (!*pparts)
60 return -ENOMEM; 59 return -ENOMEM;
61 60
62 pp = NULL;
63 i = 0; 61 i = 0;
64 while ((pp = of_get_next_child(node, pp))) { 62 for_each_child_of_node(node, pp) {
65 const __be32 *reg; 63 const __be32 *reg;
66 int len; 64 int len;
67 int a_cells, s_cells; 65 int a_cells, s_cells;