patch-2.4.3 linux/drivers/isdn/eicon/eicon_mod.c
Next file: linux/drivers/isdn/eicon/eicon_pci.c
Previous file: linux/drivers/isdn/eicon/eicon_io.c
Back to the patch index
Back to the overall index
- Lines: 157
- Date:
Fri Mar 2 11:12:08 2001
- Orig file:
v2.4.2/linux/drivers/isdn/eicon/eicon_mod.c
- Orig date:
Wed Sep 27 13:45:40 2000
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/eicon_mod.c linux/drivers/isdn/eicon/eicon_mod.c
@@ -1,4 +1,4 @@
-/* $Id: eicon_mod.c,v 1.37 2000/09/02 11:16:47 armin Exp $
+/* $Id: eicon_mod.c,v 1.37.6.4 2001/02/16 09:09:50 armin Exp $
*
* ISDN lowlevel-module for Eicon active cards.
*
@@ -6,7 +6,7 @@
* Copyright 1998-2000 by Armin Schindler (mac@melware.de)
* Copyright 1999,2000 Cytronics & Melware (info@melware.de)
*
- * Thanks to Eicon Technology GmbH & Co. oHG for
+ * Thanks to Eicon Networks for
* documents, informations and hardware.
*
* Deutsche Mailbox Saar-Lor-Lux GmbH
@@ -32,7 +32,7 @@
#define DRIVERNAME "Eicon active ISDN driver"
#define DRIVERRELEASE "2.0"
-#define DRIVERPATCH ".15"
+#define DRIVERPATCH ".16"
#include <linux/config.h>
@@ -55,7 +55,7 @@
static eicon_card *cards = (eicon_card *) NULL; /* glob. var , contains
start of card-list */
-static char *eicon_revision = "$Revision: 1.37 $";
+static char *eicon_revision = "$Revision: 1.37.6.4 $";
extern char *eicon_pci_revision;
extern char *eicon_isa_revision;
@@ -64,9 +64,6 @@
extern int do_ioctl(struct inode *pDivasInode, struct file *pDivasFile,
unsigned int command, unsigned long arg);
extern void eicon_pci_init_conf(eicon_card *card);
-void mod_inc_use_count(void);
-void mod_dec_use_count(void);
-extern char *file_check(void);
#ifdef MODULE
#define MOD_USE_COUNT (GET_USE_COUNT (&__this_module))
@@ -377,7 +374,7 @@
#ifdef MODULE
case EICON_IOCTL_FREEIT:
while (MOD_USE_COUNT > 0) MOD_DEC_USE_COUNT;
- mod_inc_use_count();
+ MOD_INC_USE_COUNT;
return 0;
#endif
case EICON_IOCTL_LOADPCI:
@@ -573,14 +570,10 @@
eicon_log(card, 1, "eicon CMD_GETSIL not implemented\n");
return 0;
case ISDN_CMD_LOCK:
-#ifdef MODULE
- mod_inc_use_count();
-#endif
+ MOD_INC_USE_COUNT;
return 0;
case ISDN_CMD_UNLOCK:
-#ifdef MODULE
- mod_dec_use_count();
-#endif
+ MOD_DEC_USE_COUNT;
return 0;
#ifdef CONFIG_ISDN_TTY_FAX
case ISDN_CMD_FAXCMD:
@@ -1177,8 +1170,7 @@
return 0;
}
-#ifdef MODULE
-static void
+static void __exit
unregister_card(eicon_card * card)
{
isdn_ctrl cmd;
@@ -1204,7 +1196,6 @@
break;
}
}
-#endif /* MODULE */
static void
eicon_freecard(eicon_card *card) {
@@ -1311,11 +1302,7 @@
}
-#ifdef MODULE
-#define eicon_init init_module
-#endif
-
-int
+static int __init
eicon_init(void)
{
int card_count = 0;
@@ -1341,8 +1328,8 @@
#endif
strcpy(tmprev, eicon_idi_revision);
printk("%s\n", eicon_getrev(tmprev));
- printk(KERN_INFO "%s Release: %s%s (%s)\n", DRIVERNAME,
- DRIVERRELEASE, DRIVERPATCH, file_check());
+ printk(KERN_INFO "%s Release: %s%s\n", DRIVERNAME,
+ DRIVERRELEASE, DRIVERPATCH);
#ifdef CONFIG_ISDN_DRV_EICON_ISA
#ifdef CONFIG_MCA
@@ -1391,19 +1378,6 @@
return 0;
}
-
-#ifdef MODULE
-
-void mod_inc_use_count(void)
-{
- MOD_INC_USE_COUNT;
-}
-
-void mod_dec_use_count(void)
-{
- MOD_DEC_USE_COUNT;
-}
-
#ifdef CONFIG_ISDN_DRV_EICON_PCI
void DIVA_DIDD_Write(DESCRIPTOR *, int);
EXPORT_SYMBOL_NOVERS(DIVA_DIDD_Read);
@@ -1414,8 +1388,8 @@
card_t DivasCards[1];
#endif
-void
-cleanup_module(void)
+static void __exit
+eicon_exit(void)
{
#if CONFIG_PCI
#ifdef CONFIG_ISDN_DRV_EICON_PCI
@@ -1499,7 +1473,7 @@
printk(KERN_INFO "%s unloaded\n", DRIVERNAME);
}
-#else /* no module */
+#ifndef MODULE
static int __init
eicon_setup(char *line)
@@ -1712,3 +1686,5 @@
#endif /* CONFIG_MCA */
#endif /* CONFIG_ISDN_DRV_EICON_ISA */
+module_init(eicon_init);
+module_exit(eicon_exit);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)