Skip to content

Commit e0eaede

Browse files
broonieLiam Girdwood
authored andcommitted
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>
1 parent f5726ae commit e0eaede

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎drivers/regulator/core.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,8 +1053,9 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
10531053

10541054
if (dev) {
10551055
/* create a 'requested_microamps_name' sysfs entry */
1056-
size = scnprintf(buf, REG_STR_SIZE, "microamps_requested_%s",
1057-
supply_name);
1056+
size = scnprintf(buf, REG_STR_SIZE,
1057+
"microamps_requested_%s-%s",
1058+
dev_name(dev), supply_name);
10581059
if (size >= REG_STR_SIZE)
10591060
goto overflow_err;
10601061

0 commit comments

Comments
 (0)