Commit 399f8927 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[ACENIC]: Convert to alloc_etherdev.

parent ead822b8
......@@ -642,8 +642,7 @@ int __devinit acenic_probe (ACE_PROBE_ARG)
(pdev->device == PCI_DEVICE_ID_SGI_ACENIC)))
continue;
dev = init_etherdev(NULL, sizeof(struct ace_private));
dev = alloc_etherdev(sizeof(struct ace_private));
if (dev == NULL) {
printk(KERN_ERR "acenic: Unable to allocate "
"net_device structure!\n");
......@@ -653,13 +652,6 @@ int __devinit acenic_probe (ACE_PROBE_ARG)
SET_MODULE_OWNER(dev);
SET_NETDEV_DEV(dev, &pdev->dev);
if (!dev->priv)
dev->priv = kmalloc(sizeof(*ap), GFP_KERNEL);
if (!dev->priv) {
printk(KERN_ERR "acenic: Unable to allocate memory\n");
return -ENOMEM;
}
ap = dev->priv;
ap->pdev = pdev;
......@@ -739,6 +731,12 @@ int __devinit acenic_probe (ACE_PROBE_ARG)
break;
}
if (register_netdev(dev)) {
printk(KERN_ERR "acenic: device registration failed\n");
kfree(dev);
continue;
}
switch(pdev->vendor) {
case PCI_VENDOR_ID_ALTEON:
if (pdev->device == PCI_DEVICE_ID_FARALLON_PN9100T) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment