Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312482
b: refs/heads/master
c: e2c98ea
h: refs/heads/master
v: v3
  • Loading branch information
Shawn Guo authored and Mark Brown committed Jul 5, 2012
1 parent c897366 commit cced5af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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: e113d792d56d4b720b3d84c122b6af84c3bfa094
refs/heads/master: e2c98eaf928a2a0ecaca1db9aa5dc56a36699d9f
7 changes: 3 additions & 4 deletions trunk/drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,8 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
list_add(&regulator->list, &rdev->consumer_list);

if (dev) {
regulator->dev = dev;

/* Add a link to the device sysfs entry */
size = scnprintf(buf, REG_STR_SIZE, "%s-%s",
dev->kobj.name, supply_name);
Expand Down Expand Up @@ -1359,11 +1361,8 @@ void regulator_put(struct regulator *regulator)
debugfs_remove_recursive(regulator->debugfs);

/* remove any sysfs entries */
if (regulator->dev) {
if (regulator->dev)
sysfs_remove_link(&rdev->dev.kobj, regulator->supply_name);
device_remove_file(regulator->dev, &regulator->dev_attr);
kfree(regulator->dev_attr.attr.name);
}
kfree(regulator->supply_name);
list_del(&regulator->list);
kfree(regulator);
Expand Down

0 comments on commit cced5af

Please sign in to comment.