patch-1.3.19 linux/drivers/net/ne.c
Next file: linux/drivers/net/net_init.c
Previous file: linux/drivers/net/loopback.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Tue Aug 15 18:08:33 1995
- Orig file:
v1.3.18/linux/drivers/net/ne.c
- Orig date:
Sun Aug 13 14:45:32 1995
diff -u --recursive --new-file v1.3.18/linux/drivers/net/ne.c linux/drivers/net/ne.c
@@ -42,6 +42,7 @@
#include <asm/io.h>
#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
#include "8390.h"
/* Some defines that people can play with if so inclined. */
@@ -57,10 +58,6 @@
/* ---- No user-serviceable parts below ---- */
-extern struct device *init_etherdev(struct device *dev, int sizeof_private,
- unsigned long *mem_startp);
-
-
/* A zero-terminated list of I/O addresses to be probed. */
static unsigned int netcard_portlist[] =
{ 0x300, 0x280, 0x320, 0x340, 0x360, 0};
@@ -540,8 +537,12 @@
#ifdef MODULE
char kernel_version[] = UTS_RELEASE;
+static char devicename[9] = { 0, };
static struct device dev_ne2000 = {
- " " /*"ne2000"*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, ne_probe };
+ devicename, /* device name is inserted by linux/drivers/net/net_init.c */
+ 0, 0, 0, 0,
+ 0, 0,
+ 0, 0, 0, NULL, ne_probe };
int io = 0x300;
int irq = 0;
@@ -565,6 +566,10 @@
else
{
unregister_netdev(&dev_ne2000);
+
+ /* If we don't do this, we can't re-insmod it later. */
+ free_irq(dev_ne2000.irq);
+ release_region(dev_ne2000.base_addr, NE_IO_EXTENT);
}
}
#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