Merge branch 'drm-forlinus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[pandora-kernel.git] / arch / i386 / kernel / cpu / cpufreq / speedstep-centrino.c
index 0ea010a..9a826cd 100644 (file)
@@ -35,8 +35,6 @@
 #include <asm/processor.h>
 #include <asm/cpufeature.h>
 
-#include "speedstep-est-common.h"
-
 #define PFX            "speedstep-centrino: "
 #define MAINTAINER     "Jeremy Fitzhardinge <jeremy@goop.org>"
 
@@ -423,12 +421,11 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
                }
        }
 
-       centrino_model[cpu] = kmalloc(sizeof(struct cpu_model), GFP_KERNEL);
+       centrino_model[cpu] = kzalloc(sizeof(struct cpu_model), GFP_KERNEL);
        if (!centrino_model[cpu]) {
                result = -ENOMEM;
                goto err_unreg;
        }
-       memset(centrino_model[cpu], 0, sizeof(struct cpu_model));
 
        centrino_model[cpu]->model_name=NULL;
        centrino_model[cpu]->max_freq = p.states[0].core_frequency * 1000;
@@ -494,12 +491,13 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
        unsigned l, h;
        int ret;
        int i;
+       struct cpuinfo_x86 *c = &cpu_data[policy->cpu];
 
        /* Only Intel makes Enhanced Speedstep-capable CPUs */
        if (cpu->x86_vendor != X86_VENDOR_INTEL || !cpu_has(cpu, X86_FEATURE_EST))
                return -ENODEV;
 
-       if (is_const_loops_cpu(policy->cpu)) {
+       if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) {
                centrino_driver.flags |= CPUFREQ_CONST_LOOPS;
        }