patch-1.3.39 linux/drivers/net/apricot.c
Next file: linux/drivers/net/arcnet.c
Previous file: linux/drivers/net/ac3200.c
Back to the patch index
Back to the overall index
- Lines: 88
- Date:
Thu Nov 9 08:24:05 1995
- Orig file:
v1.3.38/linux/drivers/net/apricot.c
- Orig date:
Tue Aug 15 20:39:02 1995
diff -u --recursive --new-file v1.3.38/linux/drivers/net/apricot.c linux/drivers/net/apricot.c
@@ -21,10 +21,7 @@
static const char *version = "apricot.c:v0.2 05/12/94\n";
-#ifdef MODULE
#include <linux/module.h>
-#include <linux/version.h>
-#endif
#include <linux/kernel.h>
#include <linux/sched.h>
@@ -34,14 +31,14 @@
#include <linux/ioport.h>
#include <linux/malloc.h>
#include <linux/interrupt.h>
-#include <asm/bitops.h>
-#include <asm/io.h>
-#include <asm/dma.h>
-
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
+#include <asm/bitops.h>
+#include <asm/io.h>
+#include <asm/dma.h>
+
#ifndef HAVE_PORTRESERVE
#define check_region(addr, size) 0
#define request_region(addr, size,name) do ; while(0)
@@ -562,9 +559,7 @@
dev->tbusy = 0;
dev->interrupt = 0;
dev->start = 1;
-#ifdef MODULE
MOD_INC_USE_COUNT;
-#endif
/* Initialize the 82596 memory */
init_i596_mem(dev);
@@ -946,10 +941,7 @@
free_irq(dev->irq);
irq2dev_map[dev->irq] = 0;
remove_rx_bufs(dev);
-#ifdef MODULE
MOD_DEC_USE_COUNT;
-#endif
-
return 0;
}
@@ -1013,7 +1005,6 @@
#endif
#ifdef MODULE
-char kernel_version[] = UTS_RELEASE;
static char devicename[9] = { 0, };
static struct device dev_apricot = {
devicename, /* device name inserted by /linux/drivers/net/net_init.c */
@@ -1021,8 +1012,8 @@
0x300, 10,
0, 0, 0, NULL, apricot_probe };
-int io = 0x300;
-int irq = 10;
+static int io = 0x300;
+static int irq = 10;
int
init_module(void)
@@ -1037,17 +1028,12 @@
void
cleanup_module(void)
{
- if (MOD_IN_USE)
- printk("%s: device busy, remove delayed\n", dev_apricot.name);
- else
- {
unregister_netdev(&dev_apricot);
kfree_s((void *)dev_apricot.mem_start, sizeof(struct i596_private) + 0xf);
dev_apricot.priv = NULL;
/* If we don't do this, we can't re-insmod it later. */
release_region(dev_apricot.base_addr, APRICOT_TOTAL_SIZE);
- }
}
#endif /* MODULE */
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