Commit e6d20fca authored by Peter Hüwe's avatar Peter Hüwe Committed by David S. Miller

net/ethernet/alteon/acenic: Use module_pci_driver to register driver

Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.
Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 43d426c3
...@@ -702,19 +702,6 @@ static struct pci_driver acenic_pci_driver = { ...@@ -702,19 +702,6 @@ static struct pci_driver acenic_pci_driver = {
.remove = acenic_remove_one, .remove = acenic_remove_one,
}; };
static int __init acenic_init(void)
{
return pci_register_driver(&acenic_pci_driver);
}
static void __exit acenic_exit(void)
{
pci_unregister_driver(&acenic_pci_driver);
}
module_init(acenic_init);
module_exit(acenic_exit);
static void ace_free_descriptors(struct net_device *dev) static void ace_free_descriptors(struct net_device *dev)
{ {
struct ace_private *ap = netdev_priv(dev); struct ace_private *ap = netdev_priv(dev);
...@@ -3199,3 +3186,5 @@ static int read_eeprom_byte(struct net_device *dev, unsigned long offset) ...@@ -3199,3 +3186,5 @@ static int read_eeprom_byte(struct net_device *dev, unsigned long offset)
ap->name, offset); ap->name, offset);
goto out; goto out;
} }
module_pci_driver(acenic_pci_driver);
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