summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/vp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
index f221df57471..2481ed50dd1 100644
--- a/arch/arm/mach-omap2/vp.c
+++ b/arch/arm/mach-omap2/vp.c
@@ -18,7 +18,7 @@
*/
unsigned long omap_vp_get_curr_volt(struct voltagedomain *voltdm)
{
- struct omap_vp_instance *vp = voltdm->vp;
+ struct omap_vp_instance *vp;
u8 curr_vsel;
if (IS_ERR_OR_NULL(voltdm)) {
@@ -32,6 +32,8 @@ unsigned long omap_vp_get_curr_volt(struct voltagedomain *voltdm)
return 0;
}
+ vp = voltdm->vp;
+
curr_vsel = (voltdm->read(vp->voltage) & vp->common->vpvoltage_mask)
>> __ffs(vp->common->vpvoltage_mask);