linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties
@ 2015-12-17 18:04 Bartlomiej Zolnierkiewicz
  2015-12-18  1:51 ` Viresh Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2015-12-17 18:04 UTC (permalink / raw)
  To: Viresh Kumar, Lee Jones, Rafael J. Wysocki
  Cc: Stephen Boyd, nm, linaro-kernel, linux-pm,
	Bartlomiej Zolnierkiewicz, Dmitry Torokhov, Greg Kroah-Hartman,
	Len Brown, open list, Pavel Machek, Shawn Guo, linux-samsung-soc

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 <viresh.kumar@linaro.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Fixes: 01fb4d3c39d3 ("PM / OPP: Parse 'opp-<prop>-<name> 'bindings")
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
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(-)

Index: b/drivers/base/power/opp/core.c
===================================================================
--- a/drivers/base/power/opp/core.c	2015-12-17 18:57:27.358981831 +0100
+++ b/drivers/base/power/opp/core.c	2015-12-17 18:58:04.550982529 +0100
@@ -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);
 	}
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-03  0:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-17 18:04 [PATCH v2] PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties Bartlomiej Zolnierkiewicz
2015-12-18  1:51 ` Viresh Kumar
2016-01-03  0:58   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).