net/ethernet/qlogic/qlge/qlge_main: Use module_pci_driver to register driver
authorPeter Hüwe <PeterHuewe@gmx.de>
Tue, 21 May 2013 12:58:08 +0000 (12:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 May 2013 21:35:04 +0000 (14:35 -0700)
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlge/qlge_main.c

index 50235d2015925b4d70737b59e8268b107ed5d5c4..e04d471acb10d8a8e9fba7b55ef703753eae6c96 100644 (file)
@@ -4945,15 +4945,4 @@ static struct pci_driver qlge_driver = {
        .err_handler = &qlge_err_handler
 };
 
-static int __init qlge_init_module(void)
-{
-       return pci_register_driver(&qlge_driver);
-}
-
-static void __exit qlge_exit(void)
-{
-       pci_unregister_driver(&qlge_driver);
-}
-
-module_init(qlge_init_module);
-module_exit(qlge_exit);
+module_pci_driver(qlge_driver);