patch-2.4.3 linux/drivers/isdn/isdnloop/isdnloop.c
Next file: linux/drivers/isdn/isdnloop/isdnloop.h
Previous file: linux/drivers/isdn/isdn_v110.c
Back to the patch index
Back to the overall index
- Lines: 73
- Date:
Fri Mar 2 11:12:09 2001
- Orig file:
v2.4.2/linux/drivers/isdn/isdnloop/isdnloop.c
- Orig date:
Fri Nov 17 11:16:21 2000
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/isdnloop/isdnloop.c linux/drivers/isdn/isdnloop/isdnloop.c
@@ -1,4 +1,4 @@
-/* $Id: isdnloop.c,v 1.11 2000/11/13 22:51:50 kai Exp $
+/* $Id: isdnloop.c,v 1.11.6.2 2001/02/16 16:43:32 kai Exp $
* ISDN low-level module implementing a dummy loop driver.
*
@@ -21,10 +21,12 @@
*/
#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/init.h>
#include "isdnloop.h"
static char
-*revision = "$Revision: 1.11 $";
+*revision = "$Revision: 1.11.6.2 $";
static int isdnloop_addcard(char *);
@@ -975,7 +977,7 @@
* user = flag: 1 = called form userlevel, 0 called from kernel.
* card = pointer to card struct.
* Return:
- * number of bytes transfered (currently always equals len).
+ * number of bytes transferred (currently always equals len).
*/
static int
isdnloop_writecmd(const u_char * buf, int len, int user, isdnloop_card * card)
@@ -1534,22 +1536,7 @@
return 0;
}
-#ifdef MODULE
-#define isdnloop_init init_module
-#else
-void
-isdnloop_setup(char *str, int *ints)
-{
- static char sid[20];
-
- if (strlen(str)) {
- strcpy(sid, str);
- isdnloop_id = sid;
- }
-}
-#endif
-
-int
+static int __init
isdnloop_init(void)
{
char *p;
@@ -1568,9 +1555,8 @@
return (isdnloop_addcard(isdnloop_id));
}
-#ifdef MODULE
-void
-cleanup_module(void)
+static void __exit
+isdnloop_exit(void)
{
isdn_ctrl cmd;
isdnloop_card *card = cards;
@@ -1598,4 +1584,6 @@
}
printk(KERN_NOTICE "isdnloop-ISDN-driver unloaded\n");
}
-#endif
+
+module_init(isdnloop_init);
+module_exit(isdnloop_exit);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)