summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/aquantia
diff options
context:
space:
mode:
authorPavel Belous <pavel.belous@aquantia.com>2017-02-20 22:36:42 +0300
committerDavid S. Miller <davem@davemloft.net>2017-02-21 01:11:09 +0300
commit14861e9de2c2ffe404fb41cc34150f09a39acb44 (patch)
treec2e7d552f760acd523c94270fce84fb4ab1eaf02 /drivers/net/ethernet/aquantia
parent5513e16421cb9538f4e394734e4b96ea0d857b23 (diff)
downloadlinux-14861e9de2c2ffe404fb41cc34150f09a39acb44.tar.xz
net: ethernet: aquantia: Using module_pci_driver.
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>
Diffstat (limited to 'drivers/net/ethernet/aquantia')
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/aq_main.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_main.c b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
index 45c769e8c22a..91c66f577906 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_main.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
@@ -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);