Skip to content

Commit

Permalink
leds: 88pm860x: Use of_get_child_by_name
Browse files Browse the repository at this point in the history
Use of_get_child_by_name to obtain reference to charger node instead of
of_find_node_by_name which can walk outside of the parent node.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
  • Loading branch information
Krzysztof Kozlowski authored and Bryan Wu committed May 8, 2014
1 parent b0571e7 commit 77dfa77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/leds/leds-88pm860x.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static int pm860x_led_dt_init(struct platform_device *pdev,
nproot = of_node_get(pdev->dev.parent->of_node);
if (!nproot)
return -ENODEV;
nproot = of_find_node_by_name(nproot, "leds");
nproot = of_get_child_by_name(nproot, "leds");
if (!nproot) {
dev_err(&pdev->dev, "failed to find leds node\n");
return -ENODEV;
Expand Down

0 comments on commit 77dfa77

Please sign in to comment.