patch-1.3.17 linux/drivers/net/3c507.c
Next file: linux/drivers/net/8390.c
Previous file: linux/drivers/net/3c505.c
Back to the patch index
Back to the overall index
- Lines: 73
- Date:
Wed Aug 9 09:52:26 1995
- Orig file:
v1.3.16/linux/drivers/net/3c507.c
- Orig date:
Wed Aug 2 13:21:02 1995
diff -u --recursive --new-file v1.3.16/linux/drivers/net/3c507.c linux/drivers/net/3c507.c
@@ -26,6 +26,12 @@
static const char *version =
"3c507.c:v1.10 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
+
+#ifdef MODULE
+#include <linux/module.h>
+#include <linux/version.h>
+#endif
+
#include <linux/config.h>
/*
@@ -440,6 +446,11 @@
dev->tbusy = 0;
dev->interrupt = 0;
dev->start = 1;
+
+#ifdef MODULE
+ MOD_INC_USE_COUNT;
+#endif
+
return 0;
}
@@ -631,6 +642,10 @@
/* Update the statistics here. */
+#ifdef MODULE
+ MOD_DEC_USE_COUNT;
+#endif
+
return 0;
}
@@ -868,6 +883,36 @@
lp->rx_head = rx_head;
lp->rx_tail = rx_tail;
}
+#ifdef MODULE
+char kernel_version[] = UTS_RELEASE;
+static struct device dev_3c507 = {
+ " " /*"3c507"*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, el16_probe };
+
+int io = 0;
+int irq = 0;
+
+int init_module(void)
+{
+ dev_3c507.base_addr = io;
+ dev_3c507.irq = irq;
+ if (register_netdev(&dev_3c507) != 0) {
+ printk("3c507: register_netdev() returned non-zero.\n");
+ return -EIO;
+ }
+ return 0;
+}
+
+void
+cleanup_module(void)
+{
+ if (MOD_IN_USE)
+ printk("3c507: device busy, remove delayed\n");
+ else
+ {
+ unregister_netdev(&dev_3c507);
+ }
+}
+#endif /* MODULE */
/*
* Local variables:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this