summaryrefslogtreecommitdiff
path: root/drivers/regulator/pfuze100-regulator.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2014-02-14 17:20:00 +0530
committerNitin Garg <nitin.garg@freescale.com>2015-09-17 08:58:32 -0500
commit79982bfbdc3eab8ef36cb31d97eaba8afc415e21 (patch)
tree3d7afecca63b1042a994a090a7d6345edaff451e /drivers/regulator/pfuze100-regulator.c
parentd865418ecf3d7e774014d8e774900d5eaebce7b1 (diff)
regulator: pfuze100: Use of_get_child_by_name
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)
Diffstat (limited to 'drivers/regulator/pfuze100-regulator.c')
-rw-r--r--drivers/regulator/pfuze100-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index b699d4e7acc5..c1cb20204a94 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -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;