提交 77dfa771 编写于 作者: K Krzysztof Kozlowski 提交者: Bryan Wu

leds: 88pm860x: Use of_get_child_by_name

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: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: NBryan Wu <cooloney@gmail.com>
上级 b0571e7e
无相关合并请求
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部