]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: ethernet: aquantia: Using module_pci_driver.
authorPavel Belous <pavel.belous@aquantia.com>
Mon, 20 Feb 2017 19:36:42 +0000 (22:36 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Feb 2017 22:11:09 +0000 (17:11 -0500)
Remove boilerplate code by using macro module_pci_driver.

Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Reviewed-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_main.c

index 45c769e8c22a63fd03e9a0337d527402c1d7ca1c..91c66f57790688286c2788484da501829fd523d4 100644 (file)
@@ -242,22 +242,4 @@ static struct pci_driver aq_pci_ops = {
        .resume = aq_pci_resume,
 };
 
-static int __init aq_module_init(void)
-{
-       int err = 0;
-
-       err = pci_register_driver(&aq_pci_ops);
-       if (err < 0)
-               goto err_exit;
-
-err_exit:
-       return err;
-}
-
-static void __exit aq_module_exit(void)
-{
-       pci_unregister_driver(&aq_pci_ops);
-}
-
-module_init(aq_module_init);
-module_exit(aq_module_exit);
+module_pci_driver(aq_pci_ops);