patch-2.1.128 linux/drivers/net/strip.c

Next file: linux/drivers/net/yellowfin.c
Previous file: linux/drivers/net/rtl8139.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.127/linux/drivers/net/strip.c linux/drivers/net/strip.c
@@ -1270,6 +1270,8 @@
 }
 
 static const char proc_strip_status_name[] = "strip";
+
+#ifdef CONFIG_PROC_FS
 static struct proc_dir_entry proc_strip_get_status_info =
 {
     PROC_NET_STRIP_STATUS,		/* unsigned short low_ino */
@@ -1284,7 +1286,7 @@
     NULL, NULL, NULL,			/* struct proc_dir_entry *next, *parent, *subdir; */
     NULL				/* void *data; */
 };
-
+#endif /* CONFIG_PROC_FS */
 
 /************************************************************************/
 /* Sending routines							*/
@@ -2847,10 +2849,12 @@
     /*
      * Register the status file with /proc
      */
+#ifdef CONFIG_PROC_FS 
     if (proc_net_register(&proc_strip_get_status_info) != 0)
     {
         printk(KERN_ERR "strip: status proc_net_register() failed.\n");
     }
+#endif
 
 #ifdef MODULE
      return status;
@@ -2881,7 +2885,9 @@
         strip_free(struct_strip_list);
 
     /* Unregister with the /proc/net file here. */
+#ifdef CONFIG_PROC_FS
     proc_net_unregister(PROC_NET_STRIP_STATUS);
+#endif
 
     if ((i = tty_register_ldisc(N_STRIP, NULL)))
         printk(KERN_ERR "STRIP: can't unregister line discipline (err = %d)\n", i);

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