patch-2.3.29 linux/arch/i386/kernel/mtrr.c

Next file: linux/arch/i386/kernel/pci-i386.c
Previous file: linux/arch/i386/kernel/mca.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.28/linux/arch/i386/kernel/mtrr.c linux/arch/i386/kernel/mtrr.c
@@ -1446,12 +1446,6 @@
     return 0;
 }   /*  End Function mtrr_ioctl  */
 
-static int mtrr_open (struct inode *ino, struct file *filep)
-{
-    MOD_INC_USE_COUNT;
-    return 0;
-}   /*  End Function mtrr_open  */
-
 static int mtrr_close (struct inode *ino, struct file *file)
 {
     int i, max;
@@ -1482,7 +1476,7 @@
     NULL,        /*  Poll              */
     mtrr_ioctl,  /*  IOctl             */
     NULL,        /*  MMAP              */
-    mtrr_open,   /*  Open              */
+    NULL,	 /*  Open              */
     NULL,        /*  Flush             */
     mtrr_close,  /*  Release           */
     NULL,        /*  Fsync             */
@@ -1515,11 +1509,7 @@
 	NULL			/* revalidate */
 };
 
-static struct proc_dir_entry proc_root_mtrr = {
-	0, 4, "mtrr",
-	S_IFREG | S_IWUSR | S_IRUGO, 1, 0, 0,
-	0, &proc_mtrr_inode_operations
-};
+static struct proc_dir_entry *proc_root_mtrr;
 
 static void compute_ascii (void)
 {
@@ -1555,7 +1545,7 @@
 	    ascii_buf_bytes += strlen (ascii_buffer + ascii_buf_bytes);
 	}
     }
-    proc_root_mtrr.size = ascii_buf_bytes;
+    proc_root_mtrr->size = ascii_buf_bytes;
 }   /*  End Function compute_ascii  */
 
 #endif  /*  CONFIG_PROC_FS  */
@@ -1826,9 +1816,9 @@
 #  endif  /*  !__SMP__  */
 
 #  ifdef CONFIG_PROC_FS
-    proc_register (&proc_root, &proc_root_mtrr);
-#  endif
-
+    proc_root_mtrr = create_proc_entry("mtrr", S_IWUSR|S_IRUGO, &proc_root);
+    proc_root_mtrr->ops = &proc_mtrr_inode_operations;
+#endif    
     init_table ();
     return 0;
 }   /*  End Function mtrr_init  */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)