diff mbox

[v2,2/4] OMAP SRF: adjust OPP array access

Message ID 1261177539-15429-3-git-send-email-khilman@deeprootsystems.com (mailing list archive)
State Accepted
Headers show

Commit Message

Kevin Hilman Dec. 18, 2009, 11:05 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c
index 05e70b7..1fa8bb5 100644
--- a/arch/arm/mach-omap2/resource34xx.c
+++ b/arch/arm/mach-omap2/resource34xx.c
@@ -337,8 +337,8 @@  static int program_opp(int res, struct omap_opp *opp, int target_level,
 #ifdef CONFIG_OMAP_SMARTREFLEX
 	unsigned long t_opp, c_opp;
 
-	t_opp = ID_VDD(res) | ID_OPP_NO(opp[target_level].opp_id);
-	c_opp = ID_VDD(res) | ID_OPP_NO(opp[current_level].opp_id);
+	t_opp = ID_VDD(res) | ID_OPP_NO(opp[target_level - 1].opp_id);
+	c_opp = ID_VDD(res) | ID_OPP_NO(opp[current_level - 1].opp_id);
 #endif
 
 	/* See if have a freq associated, if not, invalid opp */