提交 73d23ca7 编写于 作者: A Axel Lin 提交者: Mark Brown

regulator: ltc3589: Use of_get_child_by_name

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: NAxel Lin <axel.lin@ingics.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 7171511e
...@@ -255,7 +255,7 @@ static int ltc3589_parse_regulators_dt(struct ltc3589 *ltc3589) ...@@ -255,7 +255,7 @@ static int ltc3589_parse_regulators_dt(struct ltc3589 *ltc3589)
struct device_node *node; struct device_node *node;
int i, ret; int i, ret;
node = of_find_node_by_name(dev->of_node, "regulators"); node = of_get_child_by_name(dev->of_node, "regulators");
if (!node) { if (!node) {
dev_err(dev, "regulators node not found\n"); dev_err(dev, "regulators node not found\n");
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册