public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	Lee Jones <lee.jones@linaro.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>,
	nm@ti.com, linaro-kernel@lists.linaro.org,
	linux-pm@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Dmitry Torokhov <dtor@chromium.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Len Brown <len.brown@intel.com>,
	open list <linux-kernel@vger.kernel.org>,
	Pavel Machek <pavel@ucw.cz>, Shawn Guo <shawnguo@kernel.org>,
	linux-samsung-soc@vger.kernel.org
Subject: [PATCH v2] PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties
Date: Thu, 17 Dec 2015 19:04:38 +0100	[thread overview]
Message-ID: <1471955.ORlHo2b56O@amdc1976> (raw)

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);
 	}
 


             reply	other threads:[~2015-12-17 18:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-17 18:04 Bartlomiej Zolnierkiewicz [this message]
2015-12-18  1:51 ` [PATCH v2] PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties Viresh Kumar
2016-01-03  0:58   ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471955.ORlHo2b56O@amdc1976 \
    --to=b.zolnierkie@samsung.com \
    --cc=dtor@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee.jones@linaro.org \
    --cc=len.brown@intel.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pavel@ucw.cz \
    --cc=rafael.j.wysocki@intel.com \
    --cc=sboyd@codeaurora.org \
    --cc=shawnguo@kernel.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox