aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2014-05-19 04:25:30 -0400
committerMark Brown <broonie@linaro.org>2014-05-19 12:40:06 -0400
commita6016c523ef2f86d4ec60b87b480dd1a2c5ae33a (patch)
tree8f359eb491761b4ca27dfa4fbc543dee527e3292 /drivers/regulator
parentdfe7a1b058bbb29fa524ca7cf05aa13ff52983f4 (diff)
regulator: AXP20x: fix wrong call to of_find_node_by_name
The of_find_node_by_name function will search for a DT node named "regulators" after the provided np node, but will not ensure that this node is a child of np. This might result in retrieving a "regulators" node that is not related to the axp20x PMIC. Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> Acked-by: Carlo Caione <carlo@caione.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/axp20x-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
index 78a29e60f53a..61ae4d4fbdd0 100644
--- a/drivers/regulator/axp20x-regulator.c
+++ b/drivers/regulator/axp20x-regulator.c
@@ -188,7 +188,7 @@ static int axp20x_regulator_parse_dt(struct platform_device *pdev)
188 if (!np) 188 if (!np)
189 return 0; 189 return 0;
190 190
191 regulators = of_find_node_by_name(np, "regulators"); 191 regulators = of_get_child_by_name(np, "regulators");
192 if (!regulators) { 192 if (!regulators) {
193 dev_warn(&pdev->dev, "regulators node not found\n"); 193 dev_warn(&pdev->dev, "regulators node not found\n");
194 } else { 194 } else {