patch-1.3.19 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

diff -u --recursive --new-file v1.3.18/linux/drivers/net/apricot.c linux/drivers/net/apricot.c
@@ -714,7 +714,7 @@
     if(memcmp(eth_addr,"\x00\x00\x49",3)!= 0)
     	return ENODEV;
 
-    request_region(ioaddr, APRICOT_TOTAL_SIZE,"apricot");
+    request_region(ioaddr, APRICOT_TOTAL_SIZE, "apricot");
 
     dev->base_addr = ioaddr;
     ether_setup(dev);
@@ -1014,8 +1014,9 @@
 
 #ifdef MODULE
 char kernel_version[] = UTS_RELEASE;
+static char devicename[9] = { 0, };
 static struct device dev_apricot = {
-  "        ", /* device name inserted by /linux/drivers/net/net_init.c */
+  devicename, /* device name inserted by /linux/drivers/net/net_init.c */
   0, 0, 0, 0,
   0x300, 10,
   0, 0, 0, NULL, apricot_probe };
@@ -1043,6 +1044,9 @@
     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