regulator: tps65217: Use of_get_child_by_name
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 14 Feb 2014 11:50:02 +0000 (17:20 +0530)
committerMark Brown <broonie@linaro.org>
Fri, 14 Feb 2014 21:21:54 +0000 (21:21 +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/tps65217-regulator.c

index 9ea1bf26bd137b4b4e33dcede0c6c1551ff6d79c..fd441f2738f5a6af0175e78e6838313fd65ac172 100644 (file)
@@ -187,7 +187,7 @@ static struct tps65217_board *tps65217_parse_dt(struct platform_device *pdev)
        struct device_node *regs;
        int i, count;
 
-       regs = of_find_node_by_name(node, "regulators");
+       regs = of_get_child_by_name(node, "regulators");
        if (!regs)
                return NULL;