summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/voltage.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-07-18 23:24:17 (GMT)
committerKevin Hilman <khilman@ti.com>2011-09-15 19:09:22 (GMT)
commit6a62b78d9aa6661cae1a7d30b574daf435a14c47 (patch)
tree4812b637f223c71828a56ddd3261113024459a0e /arch/arm/mach-omap2/voltage.c
parentd5c128289f5066a7c6bf27d6ba27a6ae425be757 (diff)
downloadlinux-6a62b78d9aa6661cae1a7d30b574daf435a14c47.tar.xz
OMAP3+: voltage: update nominal voltage in voltdm_scale() not VC post-scale
Currently, the nominal voltage is updated in the VC post-scale function which is common to both scaling methods. However, this has readabiliy problems as this update is not where it might be expected. Instead, move the updated into voltdm_scale() upon a successful return of voltdm->scale() Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/voltage.c')
-rw-r--r--arch/arm/mach-omap2/voltage.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index 441c2d9..64070ac 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -85,7 +85,11 @@ int voltdm_scale(struct voltagedomain *voltdm,
return -ENODATA;
}
- return voltdm->scale(voltdm, target_volt);
+ ret = voltdm->scale(voltdm, target_volt);
+ if (!ret)
+ voltdm->nominal_volt = target_volt;
+
+ return ret;
}
/**