diff options
Diffstat (limited to 'drivers/opp/of.c')
-rw-r--r-- | drivers/opp/of.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/opp/of.c b/drivers/opp/of.c index ade6d42cae46..ae5c405bbf9a 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -1077,9 +1077,11 @@ static int _of_add_opp_table_v1(struct device *dev, struct opp_table *opp_table) val = prop->value; while (nr) { + unsigned long freq = be32_to_cpup(val++) * 1000; + unsigned long volt = be32_to_cpup(val++); struct dev_pm_opp_data data = { - .freq = be32_to_cpup(val++) * 1000, - .u_volt = be32_to_cpup(val++), + .freq = freq, + .u_volt = volt, }; ret = _opp_add_v1(opp_table, dev, &data, false); |