patch-2.1.29 linux/drivers/char/misc.c

Next file: linux/drivers/char/serial.c
Previous file: linux/drivers/char/keyboard.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.28/linux/drivers/char/misc.c linux/drivers/char/misc.c
@@ -74,7 +74,8 @@
 extern int rtc_init(void);
 
 #ifdef CONFIG_PROC_FS
-static int proc_misc_read(char *buf, char **start, off_t offset, int len, int unused)
+static int misc_read_proc(char *buf, char **start, off_t offset,
+			  int len, int *eof, void *private)
 {
 	struct miscdevice *p;
 
@@ -183,19 +184,16 @@
 #endif
 
 #if defined(CONFIG_PROC_FS) && !defined(MODULE)
-static struct proc_dir_entry proc_misc = {
-	0, 4, "misc",
-	S_IFREG | S_IRUGO, 1, 0, 0,
-	0, NULL /* ops -- default to array */,
-	&proc_misc_read /* get_info */,
-};
+static struct proc_dir_entry *proc_misc;	
 #endif
 
 int misc_init(void)
 {
 #ifndef MODULE
 #ifdef CONFIG_PROC_FS
-	proc_register_dynamic(&proc_root, &proc_misc);	
+	proc_misc = create_proc_entry("misc", 0, 0);
+	if (proc_misc)
+		proc_misc->read_proc = misc_read_proc;
 #endif /* PROC_FS */
 #ifdef CONFIG_BUSMOUSE
 	bus_mouse_init();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov