Re: [PATCH RESEND 4.4.y-cip 08/15] PM / OPP: Parse 'opp-<prop>-<name>' bindings

Pavel Machek


/* TODO: Support multiple regulators */
-static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev)
+static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
+ struct device_opp *dev_opp)
u32 microvolt[3] = {0};
u32 val;
int count, ret;
+ struct property *prop = NULL;
+ char name[NAME_MAX];
+ /* Search for "opp-microvolt-<name>" */
+ if (dev_opp->prop_name) {
+ sprintf(name, "opp-microvolt-%s", dev_opp->prop_name);
+ prop = of_find_property(opp->np, name, NULL);
+ }
+ if (!prop) {
+ /* Search for "opp-microvolt" */
+ name[13] = '\0';
+ prop = of_find_property(opp->np, name, NULL);
If in !dev_opp->prop_name, it will pass uninitialized buffer to
This is fixed in the next patch. But I wonder if we should merge them
into one for -cip... Unlike mainline, we already know about the
bug. No need to prepare trap for people doing bisect.

Best regards,

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Join to automatically receive all group messages.