]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
regulator: pfuze100: Use of_get_child_by_name
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 14 Feb 2014 11:50:00 +0000 (17:20 +0530)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:17:15 +0000 (21:17 -0600)
of_find_node_by_name walks the allnodes list, and can thus walk
outside of the parent node. Use of_get_child_by_name instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit d7857c429475677a6a42d0dce7f870d6241edd41)

drivers/regulator/pfuze100-regulator.c

index b699d4e7acc5b125e0b42eee2858c7ff1b225271..c1cb20204a94e77f23ff6e564887d6a9091fa04b 100644 (file)
@@ -254,7 +254,7 @@ static int pfuze_parse_regulators_dt(struct pfuze_chip *chip)
        if (!np)
                return 0;
 
-       parent = of_find_node_by_name(np, "regulators");
+       parent = of_get_child_by_name(np, "regulators");
        if (!parent) {
                dev_err(dev, "regulators node not found\n");
                return -EINVAL;