net/ethernet/broadcom/tg3: Use module_pci_driver to register driver
authorPeter Hüwe <PeterHuewe@gmx.de>
Tue, 21 May 2013 12:58:06 +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>
Acked-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c

index fb06aa1202932e6ae3c3d57a314aed16b8703791..4f0e3fe99e174816b4fe22cbe2fdabaa7430e6c1 100644 (file)
@@ -17804,15 +17804,4 @@ static struct pci_driver tg3_driver = {
        .driver.pm      = &tg3_pm_ops,
 };
 
-static int __init tg3_init(void)
-{
-       return pci_register_driver(&tg3_driver);
-}
-
-static void __exit tg3_cleanup(void)
-{
-       pci_unregister_driver(&tg3_driver);
-}
-
-module_init(tg3_init);
-module_exit(tg3_cleanup);
+module_pci_driver(tg3_driver);