[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7597a017aa4fcfbf69a393cee4ce367acd77f66f.1487590641.git.pavel.belous@aquantia.com>
Date: Mon, 20 Feb 2017 14:41:46 +0300
From: Pavel Belous <Pavel.Belous@...antia.com>
To: "David S . Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org,
Simon Edelhaus <Simon.Edelhaus@...antia.com>,
Alexey Andriyanov <Alexey.Andriyanov@...antia.com>,
Lino Sanfilippo <LinoSanfilippo@....de>,
Pavel Belous <pavel.belous@...antia.com>
Subject: [PATCH net-next v3 04/12] net: ethernet: aquantia: Using module_pci_driver.
From: Pavel Belous <pavel.belous@...antia.com>
Remove boilerplate code by using macro module_pci_driver.
Signed-off-by: Pavel Belous <pavel.belous@...antia.com>
Reviewed-by: Lino Sanfilippo <LinoSanfilippo@....de>
---
drivers/net/ethernet/aquantia/atlantic/aq_main.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_main.c b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
index 45c769e..91c66f5 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);
--
2.7.4
Powered by blists - more mailing lists