Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127862
b: refs/heads/master
c: 6001e13
h: refs/heads/master
v: v3
  • Loading branch information
David Brownell authored and Liam Girdwood committed Jan 8, 2009
1 parent 224f620 commit bf533de
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9fe5817f196054142b9a13ed78c73b76a29f2ea3
refs/heads/master: 6001e13c5f708eb68c744a69df3c2c281156030d
14 changes: 14 additions & 0 deletions trunk/drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,20 @@ static int set_consumer_device_supply(struct regulator_dev *rdev,
if (supply == NULL)
return -EINVAL;

list_for_each_entry(node, &regulator_map_list, list) {
if (consumer_dev != node->dev)
continue;
if (strcmp(node->supply, supply) != 0)
continue;

dev_dbg(consumer_dev, "%s/%s is '%s' supply; fail %s/%s\n",
dev_name(&node->regulator->dev),
node->regulator->desc->name,
supply,
dev_name(&rdev->dev), rdev->desc->name);
return -EBUSY;
}

node = kmalloc(sizeof(struct regulator_map), GFP_KERNEL);
if (node == NULL)
return -ENOMEM;
Expand Down

0 comments on commit bf533de

Please sign in to comment.