clk: s2mps11: Use of_get_child_by_name
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Fri, 21 Mar 2014 12:39:20 +0000 (13:39 +0100)
committerMike Turquette <mturquette@linaro.org>
Mon, 24 Mar 2014 22:11:27 +0000 (15:11 -0700)
of_find_node_by_name() walks over all nodes and can thus walk outside of
the parent node. Use of_get_child_by_name() instead.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/clk-s2mps11.c

index 10e66e90d81cb24e59ca7e6196d6b9ea90dcb724..f2f62a1bf61aaae9094e316eeddb4830a3286a55 100644 (file)
@@ -134,7 +134,7 @@ static struct device_node *s2mps11_clk_parse_dt(struct platform_device *pdev)
        if (!iodev->dev->of_node)
                return ERR_PTR(-EINVAL);
 
-       clk_np = of_find_node_by_name(iodev->dev->of_node, "clocks");
+       clk_np = of_get_child_by_name(iodev->dev->of_node, "clocks");
        if (!clk_np) {
                dev_err(&pdev->dev, "could not find clock sub-node\n");
                return ERR_PTR(-EINVAL);