patch-2.3.99-pre7 linux/drivers/net/depca.c

Next file: linux/drivers/net/dgrs.c
Previous file: linux/drivers/net/de620.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/net/depca.c linux/drivers/net/depca.c
@@ -1524,7 +1524,7 @@
 {
     struct net_device *new;
 
-    new = (struct net_device *)kmalloc(sizeof(struct net_device)+8, GFP_KERNEL);
+    new = (struct net_device *)kmalloc(sizeof(struct net_device), GFP_KERNEL);
     if (new == NULL) {
 	printk("eth%d: Device not initialised, insufficient memory\n",num_eth);
 	return NULL;
@@ -1532,7 +1532,6 @@
 	new->next = dev->next;
 	dev->next = new;
 	dev = dev->next;               /* point to the new device */
-	dev->name = (char *)(dev + 1);
 	if (num_eth > 9999) {
 	    sprintf(dev->name,"eth????");/* New device name */
 	} else {
@@ -2002,9 +2001,8 @@
 }
 
 #ifdef MODULE
-static char devicename[9] = {0,};
 static struct net_device thisDepca = {
-  devicename,  /* device name is inserted by /linux/drivers/net/net_init.c */
+  "",  /* device name is inserted by /linux/drivers/net/net_init.c */
   0, 0, 0, 0,
   0x200, 7,    /* I/O address, IRQ */
   0, 0, 0, NULL, depca_probe

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)