patch-1.3.19 linux/drivers/net/hp-plus.c
Next file: linux/drivers/net/hp.c
Previous file: linux/drivers/net/ewrk3.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Tue Aug 15 18:08:33 1995
- Orig file:
v1.3.18/linux/drivers/net/hp-plus.c
- Orig date:
Sun Aug 13 14:45:31 1995
diff -u --recursive --new-file v1.3.18/linux/drivers/net/hp-plus.c linux/drivers/net/hp-plus.c
@@ -367,8 +367,12 @@
#ifdef MODULE
char kernel_version[] = UTS_RELEASE;
+static char devicename[9] = { 0, };
static struct device dev_hp = {
- " " /*"hp"*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, hp_plus_probe };
+ devicename, /* device name is inserted by linux/drivers/net/net_init.c */
+ 0, 0, 0, 0,
+ 0, 0,
+ 0, 0, 0, NULL, hp_plus_probe };
int io = 0x200;
int irq = 0;
@@ -376,11 +380,11 @@
int init_module(void)
{
if (io == 0)
- printk("HP-plus: You should not use auto-probing with insmod!\n");
+ printk("HP-plus: You should not use auto-probing with insmod!\n");
dev_hp.base_addr = io;
dev_hp.irq = irq;
if (register_netdev(&dev_hp) != 0) {
- printk("hp: register_netdev() returned non-zero.\n");
+ printk("HP-plus: register_netdev() returned non-zero.\n");
return -EIO;
}
return 0;
@@ -390,10 +394,15 @@
cleanup_module(void)
{
if (MOD_IN_USE)
- printk("hp: device busy, remove delayed\n");
+ printk("HP-plus: device busy, remove delayed\n");
else
{
+ int ioaddr = dev_hp.base_addr - NIC_OFFSET;
+
unregister_netdev(&dev_hp);
+
+ /* If we don't do this, we can't re-insmod it later. */
+ release_region(ioaddr, HP_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