patch-2.3.27 linux/drivers/char/ip2main.c

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

diff -u --recursive --new-file v2.3.26/linux/drivers/char/ip2main.c linux/drivers/char/ip2main.c
@@ -74,16 +74,6 @@
 int ip2_read_procmem(char *, char **, off_t, int, int );
 int ip2_read_proc(char *, char **, off_t, int, int *, void * );
 
-struct proc_dir_entry ip2_proc_entry = {
-   0,
-   6,"ip2mem",
-   S_IFREG | S_IRUGO,
-   1, 0, 0,
-   0,
-   NULL,
-   ip2_read_procmem
-};
-
 /********************/
 /* Type Definitions */
 /********************/
@@ -429,9 +419,7 @@
 	if ( ( err = unregister_chrdev ( IP2_IPL_MAJOR, pcIpl ) ) ) {
 		printk(KERN_ERR "IP2: failed to unregister IPL driver (%d)\n", err);
 	}
-	if ( ( err = proc_unregister( &proc_root, ip2_proc_entry.low_ino ) ) ) {
-		printk(KERN_ERR "IP2: failed to unregister read_procmem (%d)\n", err);
-	}
+	remove_proc_entry("ip2mem", &proc_root);
 
 	// free memory
 	for (i = 0; i < IP2_MAX_BOARDS; i++) {
@@ -673,8 +661,8 @@
 		printk(KERN_ERR "IP2: failed to register IPL device (%d)\n", err );
 	} else
 	/* Register the read_procmem thing */
-	if ( ( err = proc_register( &proc_root,  &ip2_proc_entry ) ) ) {
-		printk(KERN_ERR "IP2: failed to register read_procmem (%d)\n", err );
+	if (!create_proc_info_entry("ip2mem",0,&proc_root,ip2_read_procmem)) {
+		printk(KERN_ERR "IP2: failed to register read_procmem\n");
 	} else {
 
 #ifdef IP2DEBUG_TRACE

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