patch-1.3.39 linux/drivers/net/3c507.c
Next file: linux/drivers/net/3c509.c
Previous file: linux/drivers/net/3c505.c
Back to the patch index
Back to the overall index
- Lines: 57
- Date:
Thu Nov 9 08:24:05 1995
- Orig file:
v1.3.38/linux/drivers/net/3c507.c
- Orig date:
Wed Nov 8 07:11:31 1995
diff -u --recursive --new-file v1.3.38/linux/drivers/net/3c507.c linux/drivers/net/3c507.c
@@ -442,9 +442,7 @@
dev->interrupt = 0;
dev->start = 1;
-#ifdef MODULE
MOD_INC_USE_COUNT;
-#endif
return 0;
}
@@ -637,9 +635,7 @@
/* Update the statistics here. */
-#ifdef MODULE
MOD_DEC_USE_COUNT;
-#endif
return 0;
}
@@ -887,8 +883,8 @@
0, 0, 0, NULL, el16_probe
};
-int io = 0x300;
-int irq = 0;
+static int io = 0x300;
+static int irq = 0;
int init_module(void)
{
@@ -906,18 +902,13 @@
void
cleanup_module(void)
{
- if (MOD_IN_USE)
- printk("3c507: device busy, remove delayed\n");
- else
- {
- unregister_netdev(&dev_3c507);
- kfree(dev_3c507.priv);
- dev_3c507.priv = NULL;
-
- /* If we don't do this, we can't re-insmod it later. */
- free_irq(dev_3c507.irq);
- release_region(dev_3c507.base_addr, EL16_IO_EXTENT);
- }
+ unregister_netdev(&dev_3c507);
+ kfree(dev_3c507.priv);
+ dev_3c507.priv = NULL;
+
+ /* If we don't do this, we can't re-insmod it later. */
+ free_irq(dev_3c507.irq);
+ release_region(dev_3c507.base_addr, EL16_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