Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350449
b: refs/heads/master
c: 86f6673
h: refs/heads/master
i:
  350447: 6a47bf4
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Jan 31, 2013
1 parent a7b16ae commit e04bd69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee70b258498174ba50b346960763203b7cba9d4a
refs/heads/master: 86f6673325e38274c55f3df9f919d9a618f100d4
8 changes: 3 additions & 5 deletions trunk/drivers/regulator/mc13xxx-regulator-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,15 @@ EXPORT_SYMBOL_GPL(mc13xxx_fixed_regulator_ops);
#ifdef CONFIG_OF
int mc13xxx_get_num_regulators_dt(struct platform_device *pdev)
{
struct device_node *parent, *child;
int num = 0;
struct device_node *parent;
int num;

of_node_get(pdev->dev.parent->of_node);
parent = of_find_node_by_name(pdev->dev.parent->of_node, "regulators");
if (!parent)
return -ENODEV;

for_each_child_of_node(parent, child)
num++;

num = of_get_child_count(parent);
of_node_put(parent);
return num;
}
Expand Down

0 comments on commit e04bd69

Please sign in to comment.