summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-09 16:22:21 +0100
committerLiam Girdwood <lrg@slimlogic.co.uk>2011-06-09 19:14:29 +0100
commite0eaedefda8e14ed3f445f382c568c5d69e4223f (patch)
tree34babbd04be428c4e899f374734e3a0aab94794c /drivers/regulator
parentf5726ae33c382366ea1b23240d5620dcf675d81d (diff)
downloadop-kernel-dev-e0eaedefda8e14ed3f445f382c568c5d69e4223f.zip
op-kernel-dev-e0eaedefda8e14ed3f445f382c568c5d69e4223f.tar.gz
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>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 75312bd..e3b67ee 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1053,8 +1053,9 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
if (dev) {
/* create a 'requested_microamps_name' sysfs entry */
- size = scnprintf(buf, REG_STR_SIZE, "microamps_requested_%s",
- supply_name);
+ size = scnprintf(buf, REG_STR_SIZE,
+ "microamps_requested_%s-%s",
+ dev_name(dev), supply_name);
if (size >= REG_STR_SIZE)
goto overflow_err;
OpenPOWER on IntegriCloud