patch-2.3.19 linux/drivers/net/pcmcia/ray_cs.c

Next file: linux/drivers/net/pcnet32.c
Previous file: linux/drivers/net/pcmcia/pcnet_cs.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.18/linux/drivers/net/pcmcia/ray_cs.c linux/drivers/net/pcmcia/ray_cs.c
@@ -2297,7 +2297,7 @@
     return 0;
 } /* End build_auth_frame */
 /*===========================================================================*/
-int init_ray_cs(void)
+static int __init init_ray_cs(void)
 {
     int rc;
     servinfo_t serv;
@@ -2310,30 +2310,29 @@
     }
     rc = register_pcmcia_driver(&dev_info, &ray_attach, &ray_detach);
     DEBUG(1, "raylink init_module register_pcmcia_driver returns 0x%x\n",rc);
+#ifdef CONFIG_PROC_FS    
     proc_register(&proc_root, &ray_cs_proc_entry);
+#endif    
     if (translate != 0) translate = 1;
     return 0;
-} /* init_module */
+} /* init_ray_cs */
 
-static char init_ess_id[ESSID_SIZE];
+#ifndef MODULE
 
+static char init_ess_id[ESSID_SIZE];
 static int __init essid_setup(char *str)
 {
 	strncpy(init_ess_id, str, ESSID_SIZE);
 	essid = init_ess_id;
 	return 1;
 }
-
 __setup("essid=", essid_setup);
 
+#endif
+
 /*===========================================================================*/
-#ifdef MODULE
-int init_module(void)
-{
-	init_ray_cs();
-}
 
-void cleanup_module(void)
+static void __exit exit_ray_cs(void)
 {
     DEBUG(0, "ray_cs: cleanup_module\n");
 
@@ -2342,7 +2341,12 @@
         if (dev_list->state & DEV_CONFIG) ray_release((u_long)dev_list);
         ray_detach(dev_list);
     }
+#ifdef CONFIG_PROC_FS    
     proc_unregister(&proc_root, ray_cs_proc_entry.low_ino);
-} /* cleanup_module */
-#endif
+#endif   
+} /* exit_ray_cs */
+
+module_init(init_ray_cs);
+module_exit(exit_ray_cs);
+
 /*===========================================================================*/

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