Commit 3c54d14f authored by Alexander Viro's avatar Alexander Viro Committed by David S. Miller

[NET]: Eliminate init_fddidev.

parent 80e47371
......@@ -425,11 +425,7 @@ static int __devinit dfx_init_one_pci_or_eisa(struct pci_dev *pdev, long ioaddr)
}
#endif
/*
* init_fddidev() allocates a device structure with private data, clears the device structure and private data,
* and calls fddi_setup() and register_netdev(). Not much left to do for us here.
*/
dev = init_fddidev(NULL, sizeof(*bp));
dev = alloc_fddidev(sizeof(*bp));
if (!dev) {
printk (KERN_ERR "defxx: unable to allocate fddidev, aborting\n");
return -ENOMEM;
......@@ -483,12 +479,17 @@ static int __devinit dfx_init_one_pci_or_eisa(struct pci_dev *pdev, long ioaddr)
goto err_out_region;
}
err = register_netdev(dev);
if (err)
goto err_out_kfree;
return 0;
err_out_kfree:
if (bp->kmalloced) kfree(bp->kmalloced);
err_out_region:
release_region(ioaddr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN);
err_out:
unregister_netdev(dev);
kfree(dev);
return err;
}
......
......@@ -251,28 +251,6 @@ static int eth_change_mtu(struct net_device *dev, int new_mtu)
#ifdef CONFIG_FDDI
/**
* init_fddidev - Register FDDI device
* @dev: A FDDI device structure to be filled in, or %NULL if a new
* struct should be allocated.
* @sizeof_priv: Size of additional driver-private structure to be allocated
* for this ethernet device
*
* Fill in the fields of the device structure with FDDI-generic values.
*
* If no device structure is passed, a new one is constructed, complete with
* a private data area of size @sizeof_priv. A 32-byte (not bit)
* alignment is enforced for this private data area.
*
* If an empty string area is passed as dev->name, or a new structure is made,
* a new name string is constructed.
*/
struct net_device *init_fddidev(struct net_device *dev, int sizeof_priv)
{
return init_netdev(dev, sizeof_priv, "fddi%d", fddi_setup);
}
/**
* alloc_fddidev - Register FDDI device
* @sizeof_priv: Size of additional driver-private structure to be allocated
......@@ -290,7 +268,6 @@ struct net_device *alloc_fddidev(int sizeof_priv)
return alloc_netdev(sizeof_priv, "fddi%d", fddi_setup);
}
EXPORT_SYMBOL(init_fddidev);
EXPORT_SYMBOL(alloc_fddidev);
static int fddi_change_mtu(struct net_device *dev, int new_mtu)
......
......@@ -34,7 +34,6 @@ extern int fddi_header(struct sk_buff *skb,
extern int fddi_rebuild_header(struct sk_buff *skb);
extern unsigned short fddi_type_trans(struct sk_buff *skb,
struct net_device *dev);
extern struct net_device *init_fddidev(struct net_device *dev, int sizeof_priv);
extern struct net_device *alloc_fddidev(int sizeof_priv);
#endif
......
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