aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.c4
-rw-r--r--arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c20
-rw-r--r--arch/i386/kernel/cpu/cpufreq/speedstep-smi.c2
-rw-r--r--drivers/cpufreq/cpufreq.c6
4 files changed, 18 insertions, 14 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index bf02b5026e62..8ef38544453c 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -467,11 +467,11 @@ static void __init longhaul_setup_voltagescaling(void)
467 } 467 }
468 468
469 if (vrmrev==0) { 469 if (vrmrev==0) {
470 dprintk ("VRM 8.5 \n"); 470 dprintk ("VRM 8.5\n");
471 memcpy (voltage_table, vrm85scales, sizeof(voltage_table)); 471 memcpy (voltage_table, vrm85scales, sizeof(voltage_table));
472 numvscales = (voltage_table[maxvid]-voltage_table[minvid])/25; 472 numvscales = (voltage_table[maxvid]-voltage_table[minvid])/25;
473 } else { 473 } else {
474 dprintk ("Mobile VRM \n"); 474 dprintk ("Mobile VRM\n");
475 memcpy (voltage_table, mobilevrmscales, sizeof(voltage_table)); 475 memcpy (voltage_table, mobilevrmscales, sizeof(voltage_table));
476 numvscales = (voltage_table[maxvid]-voltage_table[minvid])/5; 476 numvscales = (voltage_table[maxvid]-voltage_table[minvid])/5;
477 } 477 }
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
index 327a55d4d1c6..c397b6220430 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
@@ -259,7 +259,7 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy)
259 259
260 if (model->op_points == NULL) { 260 if (model->op_points == NULL) {
261 /* Matched a non-match */ 261 /* Matched a non-match */
262 dprintk(KERN_INFO PFX "no table support for CPU model \"%s\": \n", 262 dprintk(KERN_INFO PFX "no table support for CPU model \"%s\"\n",
263 cpu->x86_model_id); 263 cpu->x86_model_id);
264#ifndef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI 264#ifndef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
265 dprintk(KERN_INFO PFX "try compiling with CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n"); 265 dprintk(KERN_INFO PFX "try compiling with CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n");
@@ -402,7 +402,7 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
402 402
403 for (i=0; i<p.state_count; i++) { 403 for (i=0; i<p.state_count; i++) {
404 if (p.states[i].control != p.states[i].status) { 404 if (p.states[i].control != p.states[i].status) {
405 dprintk("Different control (%x) and status values (%x)\n", 405 dprintk("Different control (%llu) and status values (%llu)\n",
406 p.states[i].control, p.states[i].status); 406 p.states[i].control, p.states[i].status);
407 result = -EINVAL; 407 result = -EINVAL;
408 goto err_unreg; 408 goto err_unreg;
@@ -415,7 +415,7 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
415 } 415 }
416 416
417 if (p.states[i].core_frequency > p.states[0].core_frequency) { 417 if (p.states[i].core_frequency > p.states[0].core_frequency) {
418 dprintk("P%u has larger frequency (%u) than P0 (%u), skipping\n", i, 418 dprintk("P%u has larger frequency (%llu) than P0 (%llu), skipping\n", i,
419 p.states[i].core_frequency, p.states[0].core_frequency); 419 p.states[i].core_frequency, p.states[0].core_frequency);
420 p.states[i].core_frequency = 0; 420 p.states[i].core_frequency = 0;
421 continue; 421 continue;
@@ -498,13 +498,6 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
498 if (cpu->x86_vendor != X86_VENDOR_INTEL || !cpu_has(cpu, X86_FEATURE_EST)) 498 if (cpu->x86_vendor != X86_VENDOR_INTEL || !cpu_has(cpu, X86_FEATURE_EST))
499 return -ENODEV; 499 return -ENODEV;
500 500
501 for (i = 0; i < N_IDS; i++)
502 if (centrino_verify_cpu_id(cpu, &cpu_ids[i]))
503 break;
504
505 if (i != N_IDS)
506 centrino_cpu[policy->cpu] = &cpu_ids[i];
507
508 if (is_const_loops_cpu(policy->cpu)) { 501 if (is_const_loops_cpu(policy->cpu)) {
509 centrino_driver.flags |= CPUFREQ_CONST_LOOPS; 502 centrino_driver.flags |= CPUFREQ_CONST_LOOPS;
510 } 503 }
@@ -513,6 +506,13 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
513 if (policy->cpu != 0) 506 if (policy->cpu != 0)
514 return -ENODEV; 507 return -ENODEV;
515 508
509 for (i = 0; i < N_IDS; i++)
510 if (centrino_verify_cpu_id(cpu, &cpu_ids[i]))
511 break;
512
513 if (i != N_IDS)
514 centrino_cpu[policy->cpu] = &cpu_ids[i];
515
516 if (!centrino_cpu[policy->cpu]) { 516 if (!centrino_cpu[policy->cpu]) {
517 dprintk(KERN_INFO PFX "found unsupported CPU with " 517 dprintk(KERN_INFO PFX "found unsupported CPU with "
518 "Enhanced SpeedStep: send /proc/cpuinfo to " 518 "Enhanced SpeedStep: send /proc/cpuinfo to "
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
index b25fb6b635ae..2718fb6f6aba 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
@@ -99,7 +99,7 @@ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high)
99 u32 function = GET_SPEEDSTEP_FREQS; 99 u32 function = GET_SPEEDSTEP_FREQS;
100 100
101 if (!(ist_info.event & 0xFFFF)) { 101 if (!(ist_info.event & 0xFFFF)) {
102 dprintk("bug #1422 -- can't read freqs from BIOS\n", result); 102 dprintk("bug #1422 -- can't read freqs from BIOS\n");
103 return -ENODEV; 103 return -ENODEV;
104 } 104 }
105 105
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 10b014982381..109d62ccf651 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -627,7 +627,7 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
627 627
628 ret = kobject_register(&policy->kobj); 628 ret = kobject_register(&policy->kobj);
629 if (ret) 629 if (ret)
630 goto err_out; 630 goto err_out_driver_exit;
631 631
632 /* set up files for this cpu device */ 632 /* set up files for this cpu device */
633 drv_attr = cpufreq_driver->attr; 633 drv_attr = cpufreq_driver->attr;
@@ -673,6 +673,10 @@ err_out_unregister:
673 kobject_unregister(&policy->kobj); 673 kobject_unregister(&policy->kobj);
674 wait_for_completion(&policy->kobj_unregister); 674 wait_for_completion(&policy->kobj_unregister);
675 675
676err_out_driver_exit:
677 if (cpufreq_driver->exit)
678 cpufreq_driver->exit(policy);
679
676err_out: 680err_out:
677 kfree(policy); 681 kfree(policy);
678 682