net: ethernet: slicoss: use module_pci_driver()
authorTobias Klauser <tklauser@distanz.ch>
Wed, 7 Dec 2016 13:43:30 +0000 (14:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Dec 2016 18:00:02 +0000 (13:00 -0500)
Use module_pci_driver() to get rid of some boilerplate code.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/alacritech/slicoss.c

index e77ecd5b307c32613193c34ed9ce9761b395c723..b9fbd010700802db730ddb18b3c19b453c8d699b 100644 (file)
@@ -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@gmx.de>");