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 92936c1..9a826cd 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/init.h>
 #include <linux/cpufreq.h>
 #include <linux/config.h>
+#include <linux/sched.h>       /* current */
 #include <linux/delay.h>
 #include <linux/compiler.h>
 
@@ -34,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>"
 
@@ -66,7 +65,7 @@ static const struct cpu_id cpu_ids[] = {
        [CPU_MP4HT_D0]  = {15,  3, 4 },
        [CPU_MP4HT_E0]  = {15,  4, 1 },
 };
-#define N_IDS  (sizeof(cpu_ids)/sizeof(cpu_ids[0]))
+#define N_IDS  ARRAY_SIZE(cpu_ids)
 
 struct cpu_model
 {
@@ -492,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;
        }