diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-09 11:22:21 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-06-09 14:14:29 -0400 |
commit | e0eaedefda8e14ed3f445f382c568c5d69e4223f (patch) | |
tree | 34babbd04be428c4e899f374734e3a0aab94794c | |
parent | f5726ae33c382366ea1b23240d5620dcf675d81d (diff) |
regulator: Include the device name in the microamps_requested_ file
We may have multiple devices requesting a supply with the same name so
include the device name in the generated filename for microamps_requested
to avoid duplicate files.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
-rw-r--r-- | drivers/regulator/core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 75312bd6aac4..e3b67ee48b23 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -1053,8 +1053,9 @@ static struct regulator *create_regulator(struct regulator_dev *rdev, | |||
1053 | 1053 | ||
1054 | if (dev) { | 1054 | if (dev) { |
1055 | /* create a 'requested_microamps_name' sysfs entry */ | 1055 | /* create a 'requested_microamps_name' sysfs entry */ |
1056 | size = scnprintf(buf, REG_STR_SIZE, "microamps_requested_%s", | 1056 | size = scnprintf(buf, REG_STR_SIZE, |
1057 | supply_name); | 1057 | "microamps_requested_%s-%s", |
1058 | dev_name(dev), supply_name); | ||
1058 | if (size >= REG_STR_SIZE) | 1059 | if (size >= REG_STR_SIZE) |
1059 | goto overflow_err; | 1060 | goto overflow_err; |
1060 | 1061 | ||