patch-2.3.27 linux/drivers/net/mace.c

Next file: linux/drivers/net/myri_sbus.c
Previous file: linux/drivers/net/hamradio/yam.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.26/linux/drivers/net/mace.c linux/drivers/net/mace.c
@@ -101,10 +101,10 @@
     return d;
 }
 
-int
-mace_probe(struct net_device *dev)
+int mace_probe(void)
 {
 	int j, rev;
+	struct net_device *dev;
 	struct mace_data *mp;
 	struct device_node *mace;
 	unsigned char *addr;
@@ -126,13 +126,7 @@
 		return -ENODEV;
 	}
 
-	if (dev == NULL)
-		dev = init_etherdev(0, PRIV_BYTES);
-	else {
-		dev->priv = kmalloc(PRIV_BYTES, GFP_KERNEL);
-		if (dev->priv == 0)
-			return -ENOMEM;
-	}
+	dev = init_etherdev(0, PRIV_BYTES);
 	memset(dev->priv, 0, PRIV_BYTES);
 
 	mp = (struct mace_data *) dev->priv;
@@ -913,7 +907,7 @@
 
     if(mace_devs != NULL)
 	return -EBUSY;
-    res = mace_probe(NULL);
+    res = mace_probe();
     return res;
 }
 

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