]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/cpu/cpufreq/longrun.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / cpu / cpufreq / longrun.c
index b2689514295ab361057623dd7c2afb56d7deb81e..777a7ff075ded63d0c460a4d3c5c2db64ae764e3 100644 (file)
@@ -172,7 +172,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
        u32 save_lo, save_hi;
        u32 eax, ebx, ecx, edx;
        u32 try_hi;
-       struct cpuinfo_x86 *c = cpu_data;
+       struct cpuinfo_x86 *c = &cpu_data(0);
 
        if (!low_freq || !high_freq)
                return -EINVAL;
@@ -245,7 +245,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
        if ((ecx > 95) || (ecx == 0) || (eax < ebx))
                return -EIO;
 
-       edx = (eax - ebx) / (100 - ecx);
+       edx = ((eax - ebx) * 100) / (100 - ecx);
        *low_freq = edx * 1000; /* back to kHz */
 
        dprintk("low frequency is %u kHz\n", *low_freq);
@@ -298,7 +298,7 @@ static struct cpufreq_driver longrun_driver = {
  */
 static int __init longrun_init(void)
 {
-       struct cpuinfo_x86 *c = cpu_data;
+       struct cpuinfo_x86 *c = &cpu_data(0);
 
        if (c->x86_vendor != X86_VENDOR_TRANSMETA ||
            !cpu_has(c, X86_FEATURE_LONGRUN))