lkml.org 
[lkml]   [2013]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 1/2] cpufreq: ondemand: allow custom powersave_bias_target function to be registered
On Thu, Mar 28, 2013 at 01:24:16PM -0500, Jacob Shin wrote:
> @@ -206,8 +209,8 @@ static void od_check_cpu(int cpu, unsigned int load_freq)
> __cpufreq_driver_target(policy, freq_next,
> CPUFREQ_RELATION_L);
> } else {
> - int freq = powersave_bias_target(policy, freq_next,
> - CPUFREQ_RELATION_L);
> + int freq = od_ops.powersave_bias_target(policy,
> + freq_next, CPUFREQ_RELATION_L);
> __cpufreq_driver_target(policy, freq,
> CPUFREQ_RELATION_L);

Btw, one more thing: you can simplify this code a bit, while you're at
it:

if (!od_tuners->powersave_bias) {
__cpufreq_driver_target(policy, freq_next,
CPUFREQ_RELATION_L);
return;
}

freq_next = od_ops.powersave_bias_target(policy, freq_next, CPUFREQ_RELATION_L);
__cpufreq_driver_target(policy, freq, CPUFREQ_RELATION_L);
}

and drop the local "int freq" too.

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2013-04-02 19:21    [W:0.080 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site