PD#143724 fixed error in m8b m8m2 driver
Change-Id: I6666ec1da1711225701e323d29fc2fc8c71df3d1
mali_freq_num = mali_plat_data.dvfs_table_size - 1;
if (freq < mali_plat_data.clk_sample[0])
level = mali_freq_num-1;
- if (freq >= mali_plat_data.clk_sample[mali_freq_num - 1])
+ else if (freq >= mali_plat_data.clk_sample[mali_freq_num - 1])
level = 0;
- for (i=0; i<mali_freq_num - 1 ;i++) {
- if (freq >= mali_plat_data.clk_sample[i] && freq < mali_plat_data.clk_sample[i + 1]) {
- level = i;
- level = mali_freq_num-level - 1;
- break;
+ else {
+ for (i=0; i<mali_freq_num - 1 ;i++) {
+ if (freq >= mali_plat_data.clk_sample[i] && freq < mali_plat_data.clk_sample[i + 1]) {
+ level = i;
+ level = mali_freq_num-level - 1;
+ break;
+ }
}
}
return level;
if (freq < 0)
return level;
+
mali_freq_num = mali_plat_data.dvfs_table_size - 1;
if (freq < mali_plat_data.clk_sample[0])
level = mali_freq_num-1;
- if (freq >= mali_plat_data.clk_sample[mali_freq_num - 1])
+ else if (freq >= mali_plat_data.clk_sample[mali_freq_num - 1])
level = 0;
- for (i=0; i<mali_freq_num - 1 ;i++) {
- if (freq >= mali_plat_data.clk_sample[i] && freq < mali_plat_data.clk_sample[i + 1]) {
- level = i;
- level = mali_freq_num-level - 1;
- break;
+ else {
+ for (i=0; i<mali_freq_num - 1 ;i++) {
+ if (freq >= mali_plat_data.clk_sample[i] && freq < mali_plat_data.clk_sample[i + 1]) {
+ level = i;
+ level = mali_freq_num-level - 1;
+ break;
+ }
}
}
return level;