Skip to content

Commit 71b0942

Browse files
committed
OPP: Parse named opp-microwatt property too
We missed parsing the named opp-microwatt-<name> property, fix that. Tested-by: James Calligeros <jcalligeros99@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 1b91dba commit 71b0942

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

drivers/opp/of.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,9 +695,19 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
695695
}
696696
}
697697

698-
/* Search for "opp-microwatt" */
699-
sprintf(name, "opp-microwatt");
700-
prop = of_find_property(opp->np, name, NULL);
698+
/* Search for "opp-microwatt-<name>" */
699+
prop = NULL;
700+
if (opp_table->prop_name) {
701+
snprintf(name, sizeof(name), "opp-microwatt-%s",
702+
opp_table->prop_name);
703+
prop = of_find_property(opp->np, name, NULL);
704+
}
705+
706+
if (!prop) {
707+
/* Search for "opp-microwatt" */
708+
sprintf(name, "opp-microwatt");
709+
prop = of_find_property(opp->np, name, NULL);
710+
}
701711

702712
if (prop) {
703713
pcount = of_property_count_u32_elems(opp->np, name);

0 commit comments

Comments
 (0)