aboutsummaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz2015-12-17 19:04:38 +0100
committerRafael J. Wysocki2015-12-28 01:48:21 +0100
commitfd8d8e63467c922be9ae4452cca2980d473477d9 (patch)
tree39ca3f4d3e780b7a600dd96400ed7283bac002f6 /drivers/base
parent01fb4d3c39d35b725441e8a9a26b3f3ad67793ed (diff)
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. Fixes: 01fb4d3c39d3 ("PM / OPP: Parse 'opp-<prop>-<name> 'bindings") Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/opp/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index 5c01fec1ed14..cd230c63aee6 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -814,7 +814,7 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *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_pm_opp *opp, struct device *dev,
if (!prop) {
/* Search for "opp-microamp" */
- name[12] = '\0';
+ sprintf(name, "opp-microamp");
prop = of_find_property(opp->np, name, NULL);
}