@@ -463,6 +463,7 @@ int set_opp(struct shared_resource *resp, u32 target_level)
} else if (resp == vdd2_resp) {
unsigned long req_l3_freq;
struct omap_opp *oppx = NULL;
+ u8 opp;
/* Convert the tput in KiB/s to Bus frequency in MHz */
req_l3_freq = (target_level * 1000)/4;
@@ -478,10 +479,11 @@ int set_opp(struct shared_resource *resp, u32 target_level)
/* uh uh.. no OPPs?? */
BUG_ON(IS_ERR(oppx));
- ret = freq_to_opp((u8 *)&target_level, OPP_L3, req_l3_freq);
+ ret = freq_to_opp(&opp, OPP_L3, req_l3_freq);
/* we dont expect this to fail */
BUG_ON(ret);
+ target_level = opp;
ret = resource_set_opp_level(VDD2_OPP, target_level, 0);
}
return 0;