SR and SRF currenly direclty access OPP struct internals. Use new accessor functions so OPP layer details can be further hidden. Signed-off-by: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx> --- arch/arm/mach-omap2/resource34xx.c | 14 +++++++++++--- arch/arm/mach-omap2/smartreflex.c | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c index 05e70b7..b80ee88 100644 --- a/arch/arm/mach-omap2/resource34xx.c +++ b/arch/arm/mach-omap2/resource34xx.c @@ -204,7 +204,7 @@ static int __deprecated freq_to_opp(u8 *opp_id, struct omap_opp *opps, opp = opp_find_freq_ceil(opps, &freq); if (IS_ERR(opp)) return -EINVAL; - *opp_id = opp->opp_id; + *opp_id = opp_get_opp_id(opp); return 0; } @@ -336,9 +336,17 @@ static int program_opp(int res, struct omap_opp *opp, int target_level, unsigned long freq; #ifdef CONFIG_OMAP_SMARTREFLEX unsigned long t_opp, c_opp; + int t_id, c_id; + struct omap_opp *opp_target, *opp_current; - 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); + opp_target = opp_find_by_index(opp, target_level); + t_id = opp_get_opp_id(opp_target); + + opp_current = opp_find_by_index(opp, current_level); + c_id = opp_get_opp_id(opp_current); + + t_opp = ID_VDD(res) | ID_OPP_NO(t_id); + c_opp = ID_VDD(res) | ID_OPP_NO(c_id); #endif /* See if have a freq associated, if not, invalid opp */ diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 9c0d5bf..d341857 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -159,7 +159,7 @@ static u8 get_vdd1_opp(void) if (IS_ERR(opp)) return 0; - return opp->opp_id; + return opp_get_opp_id(opp); } static u8 get_vdd2_opp(void) @@ -174,7 +174,7 @@ static u8 get_vdd2_opp(void) if (IS_ERR(opp)) return 0; - return opp->opp_id; + return opp_get_opp_id(opp); } -- 1.6.6.rc2.1.g42108 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html