]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/cpu/mtrr/if.c
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
[linux-2.6] / arch / x86 / kernel / cpu / mtrr / if.c
index 14535686c0994dbea30dc3518f6a1ee685b4885c..84c480bb3715af21405c6d55fab0f3160cbf3a59 100644 (file)
 #include <asm/mtrr.h>
 #include "mtrr.h"
 
-/* RED-PEN: this is accessed without any locking */
-extern unsigned int *usage_table;
-
-
 #define FILE_FCOUNT(f) (((struct seq_file *)((f)->private_data))->private)
 
 static const char *const mtrr_strings[MTRR_NUM_TYPES] =
@@ -397,7 +393,7 @@ static int mtrr_seq_show(struct seq_file *seq, void *offset)
        for (i = 0; i < max; i++) {
                mtrr_if->get(i, &base, &size, &type);
                if (size == 0)
-                       usage_table[i] = 0;
+                       mtrr_usage_table[i] = 0;
                else {
                        if (size < (0x100000 >> PAGE_SHIFT)) {
                                /* less than 1MB */
@@ -411,7 +407,7 @@ static int mtrr_seq_show(struct seq_file *seq, void *offset)
                        len += seq_printf(seq, 
                                   "reg%02i: base=0x%05lx000 (%4luMB), size=%4lu%cB: %s, count=%d\n",
                             i, base, base >> (20 - PAGE_SHIFT), size, factor,
-                            mtrr_attrib_to_str(type), usage_table[i]);
+                            mtrr_attrib_to_str(type), mtrr_usage_table[i]);
                }
        }
        return 0;
@@ -428,11 +424,10 @@ static int __init mtrr_if_init(void)
                return -ENODEV;
 
        proc_root_mtrr =
-           create_proc_entry("mtrr", S_IWUSR | S_IRUGO, &proc_root);
-       if (proc_root_mtrr) {
+               proc_create("mtrr", S_IWUSR | S_IRUGO, NULL, &mtrr_fops);
+
+       if (proc_root_mtrr)
                proc_root_mtrr->owner = THIS_MODULE;
-               proc_root_mtrr->proc_fops = &mtrr_fops;
-       }
        return 0;
 }