patch-2.3.19 linux/drivers/pcmcia/tcic.c

Next file: linux/drivers/scsi/a2091.c
Previous file: linux/drivers/pcmcia/rsrc_mgr.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.18/linux/drivers/pcmcia/tcic.c linux/drivers/pcmcia/tcic.c
@@ -2,7 +2,7 @@
 
     Device driver for Databook TCIC-2 PCMCIA controller
 
-    tcic.c 1.105 1999/09/06 06:55:14
+    tcic.c 1.106 1999/09/15 15:32:19
 
     The contents of this file are subject to the Mozilla Public
     License Version 1.1 (the "License"); you may not use this file
@@ -32,6 +32,7 @@
 ======================================================================*/
 
 #include <linux/module.h>
+#include <linux/init.h>
 #include <linux/types.h>
 #include <linux/fcntl.h>
 #include <linux/string.h>
@@ -59,7 +60,7 @@
 static int pc_debug = PCMCIA_DEBUG;
 MODULE_PARM(pc_debug, "i");
 static const char *version =
-"tcic.c 1.105 1999/09/06 06:55:14 (David Hinds)";
+"tcic.c 1.106 1999/09/15 15:32:19 (David Hinds)";
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
 #else
 #define DEBUG(n, args...)
@@ -229,12 +230,12 @@
 
 static volatile u_int irq_hits;
 
-static void irq_count(int irq, void *dev, struct pt_regs *regs)
+static void __init irq_count(int irq, void *dev, struct pt_regs *regs)
 {
     irq_hits++;
 }
 
-static u_int try_irq(int irq)
+static u_int __init try_irq(int irq)
 {
     u_short cfg;
 
@@ -265,7 +266,7 @@
     return (irq_hits != 1);
 }
 
-static u_int irq_scan(u_int mask0)
+static u_int __init irq_scan(u_int mask0)
 {
     u_int mask1;
     int i;
@@ -320,7 +321,7 @@
     
 ======================================================================*/
 
-static int is_active(int s)
+static int __init is_active(int s)
 {
     u_short scf1, ioctl, base, num;
     u_char pwr, sstat;
@@ -358,7 +359,7 @@
     
 ======================================================================*/
 
-static int get_tcic_id(void)
+static int __init get_tcic_id(void)
 {
     u_short id;
     
@@ -371,12 +372,19 @@
 
 /*====================================================================*/
 
-int tcic_init(void)
+static int __init init_tcic(void)
 {
     int i, sock;
     u_int mask, scan;
+    servinfo_t serv;
 
     DEBUG(0, "%s\n", version);
+    CardServices(GetCardServicesInfo, &serv);
+    if (serv.Revision != CS_RELEASE_CODE) {
+	printk(KERN_NOTICE "tcic: Card Services release "
+	       "does not match!\n");
+	return -1;
+    }
     
     printk(KERN_INFO "Databook TCIC-2 PCMCIA probe: ");
     sock = 0;
@@ -496,11 +504,11 @@
 
     return 0;
     
-} /* tcic_init */
+} /* init_tcic */
 
 /*====================================================================*/
 
-static void tcic_finish(void)
+static void __exit exit_tcic(void)
 {
     u_long flags;
     unregister_ss_entry(&tcic_service);
@@ -514,7 +522,7 @@
 	del_timer(&poll_timer);
     restore_flags(flags);
     release_region(tcic_base, 16);
-} /* tcic_finish */
+} /* exit_tcic */
 
 /*====================================================================*/
 
@@ -954,26 +962,5 @@
 
 /*====================================================================*/
 
-int pcmcia_tcic_init(void)
-{
-    servinfo_t serv;
-    CardServices(GetCardServicesInfo, &serv);
-    if (serv.Revision != CS_RELEASE_CODE) {
-	printk(KERN_NOTICE "tcic: Card Services release "
-	       "does not match!\n");
-	return -1;
-    }
-    return tcic_init();
-}
-
-#ifdef MODULE
-int init_module(void)
-{
-	return pcmcia_tcic_init();
-}
-
-void cleanup_module(void)
-{
-    tcic_finish();
-}
-#endif
+module_init(init_tcic);
+module_exit(exit_tcic);

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