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)
committerMark Brown <broonie@linaro.org>
Fri, 14 Feb 2014 21:20:06 +0000 (21:20 +0000)
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>
drivers/regulator/pfuze100-regulator.c

index ab174f20ca11f473c889848b1d7e6b7545a9e3ef..3cb19aef475dec76c002d9b57fb3a51ae745f83f 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;