Skip to content

Commit

Permalink
cpufreq: remove policy->governor setting in drivers initialization
Browse files Browse the repository at this point in the history
As policy->governor is already set to CPUFREQ_DEFAULT_GOVERNOR in the
(always built-in) cpufreq core, we do not need to set it in the drivers.
This fixes the sparc64 allmodconfig build failure.

Also, remove a totally useles setting of ->policy in cpufreq-pxa3xx.c.

Signed-off-by: Dominik Brodowski <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Dominik Brodowski authored and torvalds committed Oct 15, 2008
1 parent 04ab591 commit 459fc20
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion arch/arm/mach-integrator/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ static int integrator_cpufreq_init(struct cpufreq_policy *policy)
{

/* set default policy and cpuinfo */
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.max_freq = 160000;
policy->cpuinfo.min_freq = 12000;
policy->cpuinfo.transition_latency = 1000000; /* 1 ms, assumed */
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-pxa/cpufreq-pxa2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,6 @@ static __init int pxa_cpufreq_init(struct cpufreq_policy *policy)
pxa27x_guess_max_freq();

/* set default policy and cpuinfo */
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
if (cpu_is_pxa25x())
policy->policy = CPUFREQ_POLICY_PERFORMANCE;
policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
policy->cur = get_clk_frequency_khz(0); /* current freq */
policy->min = policy->max = policy->cur;
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-pxa/cpufreq-pxa3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ static __init int pxa3xx_cpufreq_init(struct cpufreq_policy *policy)
int ret = -EINVAL;

/* set default policy and cpuinfo */
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.min_freq = 104000;
policy->cpuinfo.max_freq = (cpu_is_pxa320()) ? 806000 : 624000;
policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-sa1100/cpu-sa1100.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ static int __init sa1100_cpu_init(struct cpufreq_policy *policy)
if (policy->cpu != 0)
return -EINVAL;
policy->cur = policy->min = policy->max = sa11x0_getspeed(0);
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.min_freq = 59000;
policy->cpuinfo.max_freq = 287000;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
Expand Down
1 change: 0 additions & 1 deletion arch/avr32/mach-at32ap/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
policy->cur = at32_get_speed(0);
policy->min = policy->cpuinfo.min_freq;
policy->max = policy->cpuinfo.max_freq;
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;

printk("cpufreq: AT32AP CPU frequency driver\n");

Expand Down
2 changes: 0 additions & 2 deletions arch/blackfin/mach-common/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ static int __init __bfin_cpu_init(struct cpufreq_policy *policy)
dpm_state_table[index].tscale);
}

policy->governor = CPUFREQ_DEFAULT_GOVERNOR;

policy->cpuinfo.transition_latency = (bfin_read_PLL_LOCKCNT() / (sclk / 1000000)) * 1000;
/*Now ,only support one cpu */
policy->cur = cclk;
Expand Down
1 change: 0 additions & 1 deletion arch/cris/arch-v32/mach-a3/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
int result;

/* cpuinfo and default policy values */
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = 1000000; /* 1ms */
policy->cur = cris_freq_get_cpu_frequency(0);

Expand Down
1 change: 0 additions & 1 deletion arch/cris/arch-v32/mach-fs/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
int result;

/* cpuinfo and default policy values */
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = 1000000; /* 1ms */
policy->cur = cris_freq_get_cpu_frequency(0);

Expand Down
1 change: 0 additions & 1 deletion arch/sparc64/kernel/us3_cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy)
table[3].index = 0;
table[3].frequency = CPUFREQ_TABLE_END;

policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = 0;
policy->cur = clock_tick;

Expand Down

0 comments on commit 459fc20

Please sign in to comment.