lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161207134330.8829-1-tklauser@distanz.ch>
Date:   Wed,  7 Dec 2016 14:43:30 +0100
From:   Tobias Klauser <tklauser@...tanz.ch>
To:     Lino Sanfilippo <LinoSanfilippo@....de>
Cc:     netdev@...r.kernel.org
Subject: [PATCH] net: ethernet: slicoss: use module_pci_driver()

Use module_pci_driver() to get rid of some boilerplate code.

Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>
---
 drivers/net/ethernet/alacritech/slicoss.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/alacritech/slicoss.c b/drivers/net/ethernet/alacritech/slicoss.c
index e77ecd5b307c..b9fbd0107008 100644
--- a/drivers/net/ethernet/alacritech/slicoss.c
+++ b/drivers/net/ethernet/alacritech/slicoss.c
@@ -1863,18 +1863,7 @@ static struct pci_driver slic_driver = {
 	.remove = slic_remove,
 };
 
-static int __init slic_init_module(void)
-{
-	return pci_register_driver(&slic_driver);
-}
-
-static void __exit slic_cleanup_module(void)
-{
-	pci_unregister_driver(&slic_driver);
-}
-
-module_init(slic_init_module);
-module_exit(slic_cleanup_module);
+module_pci_driver(slic_driver);
 
 MODULE_DESCRIPTION("Alacritech non-accelerated SLIC driver");
 MODULE_AUTHOR("Lino Sanfilippo <LinoSanfilippo@....de>");
-- 
2.11.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ