linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties
@ 2015-12-16 15:41 Bartlomiej Zolnierkiewicz
  2015-12-17  2:01 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2015-12-16 15:41 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 !dev_opp->prop_name 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>
---
This fixes Exynos4x12 cpufreq-dt support regression present in
linux-pm/linux-next tree.  Rafael, please apply.  Thank you.

 drivers/base/power/opp/core.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Index: b/drivers/base/power/opp/core.c
===================================================================
--- a/drivers/base/power/opp/core.c	2015-12-16 16:10:13.509171420 +0100
+++ b/drivers/base/power/opp/core.c	2015-12-16 16:21:18.385183902 +0100
@@ -806,11 +806,11 @@ static int opp_parse_supplies(struct dev
 	struct property *prop = NULL;
 	char name[NAME_MAX];
 
+	sprintf(name, "opp-microvolt-%s", dev_opp->prop_name);
+
 	/* Search for "opp-microvolt-<name>" */
-	if (dev_opp->prop_name) {
-		sprintf(name, "opp-microvolt-%s", dev_opp->prop_name);
+	if (dev_opp->prop_name)
 		prop = of_find_property(opp->np, name, NULL);
-	}
 
 	if (!prop) {
 		/* Search for "opp-microvolt" */
@@ -848,10 +848,10 @@ static int opp_parse_supplies(struct dev
 
 	/* Search for "opp-microamp-<name>" */
 	prop = NULL;
-	if (dev_opp->prop_name) {
-		sprintf(name, "opp-microamp-%s", dev_opp->prop_name);
+	sprintf(name, "opp-microamp-%s", dev_opp->prop_name);
+
+	if (dev_opp->prop_name)
 		prop = of_find_property(opp->np, name, NULL);
-	}
 
 	if (!prop) {
 		/* Search for "opp-microamp" */

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

end of thread, other threads:[~2015-12-17  2:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-16 15:41 [PATCH] PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties Bartlomiej Zolnierkiewicz
2015-12-17  2:01 ` Viresh Kumar

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).