Skip to content

Commit

Permalink
PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties
Browse files Browse the repository at this point in the history
commit fd8d8e6 upstream.

Commit 01fb4d3 ("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: 01fb4d3 ("PM / OPP: Parse 'opp-<prop>-<name> 'bindings")
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Dave Gerlach <[email protected]>
  • Loading branch information
bzolnier authored and Tero Kristo committed Apr 28, 2016
1 parent e0c1dfa commit 6c867a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/base/power/opp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 6c867a9

Please sign in to comment.