]> git.karo-electronics.de Git - linux-beck.git/commitdiff
regulator: da9052: Use for_each_child_of_node() macro
authorAxel Lin <axel.lin@gmail.com>
Sat, 7 Jul 2012 01:46:45 +0000 (09:46 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 9 Jul 2012 18:38:58 +0000 (19:38 +0100)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/da9052-regulator.c

index 88976d8d44edd1af9d906ca8e2acea259ab46a37..5f8f71acb6c09cd5fa152335d6e37e06e237955f 100644 (file)
@@ -405,8 +405,7 @@ static int __devinit da9052_regulator_probe(struct platform_device *pdev)
                if (!nproot)
                        return -ENODEV;
 
-               for (np = of_get_next_child(nproot, NULL); np;
-                    np = of_get_next_child(nproot, np)) {
+               for_each_child_of_node(nproot, np) {
                        if (!of_node_cmp(np->name,
                                         regulator->info->reg_desc.name)) {
                                config.init_data = of_get_regulator_init_data(