patch-2.3.99-pre4 linux/drivers/net/wan/cycx_main.c
Next file: linux/drivers/net/wan/cycx_x25.c
Previous file: linux/drivers/net/wan/cycx_drv.c
Back to the patch index
Back to the overall index
- Lines: 83
- Date:
Mon Apr 3 19:32:57 2000
- Orig file:
v2.3.99-pre3/linux/drivers/net/wan/cycx_main.c
- Orig date:
Fri Jan 28 15:09:07 2000
diff -u --recursive --new-file v2.3.99-pre3/linux/drivers/net/wan/cycx_main.c linux/drivers/net/wan/cycx_main.c
@@ -13,6 +13,8 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
* ============================================================================
+* 2000/04/02 acme dprintk and cycx_debug
+* module_init/module_exit
* 2000/01/21 acme rename cyclomx_open to cyclomx_mod_inc_use_count
* and cyclomx_close to cyclomx_mod_dec_use_count
* 2000/01/08 acme cleanup
@@ -43,15 +45,21 @@
#include <asm/uaccess.h> /* kernel <-> user copy */
#include <linux/init.h> /* __init (when not using as a module) */
+/* Debug */
+
+unsigned int cycx_debug = 0;
+
#ifdef MODULE
MODULE_AUTHOR("Arnaldo Carvalho de Melo");
MODULE_DESCRIPTION("Cyclom 2X Sync Card Driver.");
+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "cyclomx debug level");
#endif
/* Defines & Macros */
#define DRV_VERSION 0 /* version number */
-#define DRV_RELEASE 6 /* release (minor version) number */
+#define DRV_RELEASE 7 /* release (minor version) number */
#define MAX_CARDS 1 /* max number of adapters */
#ifndef CONFIG_CYCLOMX_CARDS /* configurable option */
@@ -60,10 +68,6 @@
/* Function Prototypes */
-/* Module entry points */
-int init_module (void);
-void cleanup_module (void);
-
/* WAN link driver entry points */
static int setup (wan_device_t *wandev, wandev_conf_t *conf);
static int shutdown (wan_device_t *wandev);
@@ -98,11 +102,7 @@
* < 0 error.
* Context: process
*/
-#ifdef MODULE
-int init_module (void)
-#else
int __init cyclomx_init (void)
-#endif
{
int cnt, err = 0;
@@ -156,8 +156,7 @@
* o unregister all adapters from the WAN router
* o release all remaining system resources
*/
-#ifdef MODULE
-void cleanup_module (void)
+void cyclomx_cleanup (void)
{
int i = 0;
@@ -168,7 +167,7 @@
kfree(card_array);
}
-#endif
+
/* WAN Device Driver Entry Points */
/*
* Setup/configure WAN link driver.
@@ -384,5 +383,8 @@
card->state_tick = jiffies;
spin_unlock_irqrestore(&card->lock, host_cpu_flags);
}
+
+module_init(cyclomx_init);
+module_exit(cyclomx_cleanup);
/* End */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)