[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <cc1d90b68667d8cedb95bc255df81bb6ecbf9586.1487187192.git.pavel.belous@aquantia.com>
Date: Wed, 15 Feb 2017 23:01:12 +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 04/13] 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>
---
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 e5539c8..f7513cb 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_main.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
@@ -250,22 +250,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