patch-1.3.39 linux/drivers/net/hp.c

Next file: linux/drivers/net/hp100.c
Previous file: linux/drivers/net/hp-plus.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.38/linux/drivers/net/hp.c linux/drivers/net/hp.c
@@ -22,20 +22,18 @@
 	"hp.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/kernel.h>
 #include <linux/sched.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+
 #include <asm/system.h>
 #include <asm/io.h>
 
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
 #include "8390.h"
 
 /* A zero-terminated list of I/O addresses to be probed. */
@@ -350,7 +348,6 @@
 }
 
 #ifdef MODULE
-char kernel_version[] = UTS_RELEASE;
 static char devicename[9] = { 0, };
 static struct device dev_hp = {
 	devicename, /* device name is inserted by linux/drivers/net/net_init.c */
@@ -358,8 +355,8 @@
 	0, 0,
 	0, 0, 0, NULL, hp_probe };
 
-int io = 300;
-int irq = 0;
+static int io = 300;
+static int irq = 0;
 
 int init_module(void)
 {
@@ -377,18 +374,13 @@
 void
 cleanup_module(void)
 {
-	if (MOD_IN_USE)
-		printk("hp: 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. */
-		free_irq(dev_hp.irq);
-		release_region(ioaddr, HP_IO_EXTENT);
-	}
+	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. */
+	free_irq(dev_hp.irq);
+	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