summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/dvfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/dvfs.c')
-rw-r--r--arch/arm/mach-omap2/dvfs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/dvfs.c b/arch/arm/mach-omap2/dvfs.c
index 24c1e3ffd51..5e9bd7bcf21 100644
--- a/arch/arm/mach-omap2/dvfs.c
+++ b/arch/arm/mach-omap2/dvfs.c
@@ -774,13 +774,15 @@ static int _dvfs_scale(struct device *req_dev, struct device *target_dev,
__func__, voltdm->name);
return PTR_ERR(curr_vdata);
}
- curr_volt = omap_vp_get_curr_volt(voltdm);
- if (!curr_volt)
- curr_volt = omap_get_operation_voltage(curr_vdata);
/* Disable smartreflex module across voltage and frequency scaling */
omap_sr_disable(voltdm);
+ /* Pick up the current voltage ONLY after ensuring no changes occur */
+ curr_volt = omap_vp_get_curr_volt(voltdm);
+ if (!curr_volt)
+ curr_volt = omap_get_operation_voltage(curr_vdata);
+
if (curr_volt == new_volt) {
volt_scale_dir = DVFS_VOLT_SCALE_NONE;
} else if (curr_volt < new_volt) {