Skip to contentSkip to conversation

PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties

PATCH Applied Bartlomiej Zolnierkiewicz 3 participants 3 messages Dec 17, 2015 – Jan 3, 2016

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties

Commit 01fb4d3c39d3 ("PM / OPP: Parse 'opp-<prop>-<name>' bindings") broke support for parsing standard opp-microvolt and opp-microamp properties. Fix it by setting 'name' string to proper value for !prop cases.

Cc Viresh Kumar <[email protected]>
Cc Lee Jones <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Fixes 01fb4d3c39d3 ("PM / OPP: Parse 'opp-<prop>-<name> 'bindings")

---
v2:
- rework the changes as requested by Viresh

This fixes Exynos4x12 cpufreq-dt suppport regression present in linux-pm/linux-next tree. Rafael, please apply. Thank you.

 drivers/base/power/opp/core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/base/power/opp/core.c +2 -2
Index: b/drivers/base/power/opp/core.c
===================================================================
@@ -814,7 +814,7 @@ static int opp_parse_supplies(struct dev
 
 	if (!prop) {
 		/* Search for "opp-microvolt" */
-		name[13] = '\0';
+		sprintf(name, "opp-microvolt");
 		prop = of_find_property(opp->np, name, NULL);
 
 		/* Missing property isn't a problem, but an invalid entry is */
@@ -855,7 +855,7 @@ static int opp_parse_supplies(struct dev
 
 	if (!prop) {
 		/* Search for "opp-microamp" */
-		name[12] = '\0';
+		sprintf(name, "opp-microamp");
 		prop = of_find_property(opp->np, name, NULL);
 	}
 
Acked-by on v2 1/1
#1 lore raw
Quoted 5 lines · Bartlomiej Zolnierkiewicz

Commit 01fb4d3c39d3 ("PM / OPP: Parse 'opp-<prop>-<name>' bindings") broke support for parsing standard opp-microvolt and opp-microamp properties. Fix it by setting 'name' string to proper value for !prop cases.

Quoted 8 lines
Cc Viresh Kumar <[email protected]>
Cc Lee Jones <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Fixes 01fb4d3c39d3 ("PM / OPP: Parse 'opp-<prop>-<name> 'bindings")

---
v2:
- rework the changes as requested by Viresh

Signature · 1 line
viresh
#2 lore raw
Quoted 15 lines · Viresh Kumar
Quoted 5 lines · Bartlomiej Zolnierkiewicz

Commit 01fb4d3c39d3 ("PM / OPP: Parse 'opp-<prop>-<name>' bindings") broke support for parsing standard opp-microvolt and opp-microamp properties. Fix it by setting 'name' string to proper value for !prop cases.

Quoted 8 lines
Cc Viresh Kumar <[email protected]>
Cc Lee Jones <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Fixes 01fb4d3c39d3 ("PM / OPP: Parse 'opp-<prop>-<name> 'bindings")

---
v2:
- rework the changes as requested by Viresh

Quoted 1 line

Applied, thanks!