net/ethernet/sun/sungem: Use module_pci_driver to register driver
authorPeter Hüwe <PeterHuewe@gmx.de>
Tue, 21 May 2013 12:58:09 +0000 (12:58 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 May 2013 21:35:05 +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/sun/sungem.c

index 5f3f9d52757dbffb60eb277d45acdc6a29eb49f6..e62df2b81302bd32881ca22daef127e04985679e 100644 (file)
@@ -3028,15 +3028,4 @@ static struct pci_driver gem_driver = {
 #endif /* CONFIG_PM */
 };
 
-static int __init gem_init(void)
-{
-       return pci_register_driver(&gem_driver);
-}
-
-static void __exit gem_cleanup(void)
-{
-       pci_unregister_driver(&gem_driver);
-}
-
-module_init(gem_init);
-module_exit(gem_cleanup);
+module_pci_driver(gem_driver);