continue;
}
- /* verify only 1 entry from the lo frequency table */
- if ((fid < HI_FID_TABLE_BOTTOM) && (cntlofreq++)) {
- printk(KERN_ERR PFX "Too many lo freq table entries\n");
- goto err_out_mem;
+ if (fid < HI_FID_TABLE_BOTTOM) {
+ if (cntlofreq) {
+ /* if both entries are the same, ignore this
+ * one...
+ */
+ if ((powernow_table[i].frequency != powernow_table[cntlofreq].frequency) ||
+ (powernow_table[i].index != powernow_table[cntlofreq].index)) {
+ printk(KERN_ERR PFX "Too many lo freq table entries\n");
+ goto err_out_mem;
+ }
+
+ dprintk(KERN_INFO PFX "double low frequency table entry, ignoring it.\n");
+ powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID;
+ continue;
+ } else
+ cntlofreq = i;
}
if (powernow_table[i].frequency != (data->acpi_data.states[i].core_frequency * 1000)) {
if (smp_processor_id() != pol->cpu) {
printk(KERN_ERR "limiting to cpu %u failed\n", pol->cpu);
- goto sched_out;
+ goto err_out;
}
- /* from this point, do not exit without restoring preempt and cpu */
- preempt_disable();
-
if (pending_bit_stuck()) {
printk(KERN_ERR PFX "failing targ, change pending bit set\n");
goto err_out;
ret = 0;
err_out:
- preempt_enable_no_resched();
-sched_out:
set_cpus_allowed(current, oldmask);
schedule();
return -ENODEV;
}
-static int __exit powernowk8_cpu_exit (struct cpufreq_policy *pol)
+static int powernowk8_cpu_exit (struct cpufreq_policy *pol)
{
struct powernow_k8_data *data = powernow_data[pol->cpu];
.verify = powernowk8_verify,
.target = powernowk8_target,
.init = powernowk8_cpu_init,
- .exit = powernowk8_cpu_exit,
+ .exit = __devexit_p(powernowk8_cpu_exit),
.get = powernowk8_get,
.name = "powernow-k8",
.owner = THIS_MODULE,
}
/* driver entry point for term */
-static void __exit powernowk8_exit(void)
+static void powernowk8_exit(void)
{
dprintk(KERN_INFO PFX "exit\n");