Skip to content

Commit

Permalink
regulator: ltc3589: Use of_get_child_by_name
Browse files Browse the repository at this point in the history
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: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
AxelLin authored and broonie committed Jun 16, 2014
1 parent 7171511 commit 73d23ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/ltc3589.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static int ltc3589_parse_regulators_dt(struct ltc3589 *ltc3589)
struct device_node *node;
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) {
dev_err(dev, "regulators node not found\n");
return -EINVAL;
Expand Down

0 comments on commit 73d23ca

Please sign in to comment.