realtek: r8169: use module_pci_driver macro
authorDevendra Naga <devendra.aaru@gmail.com>
Fri, 26 Oct 2012 09:27:42 +0000 (09:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Oct 2012 17:56:39 +0000 (13:56 -0400)
use the module_pci_driver macro to make the code simpler
by eliminating the module_init and module_exit calls

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c

index 2317b8cd25fdfd7933dfd99b275a6ac784f38e00..123c6a5c5fe66dd1b02f950df5ef6d55bf8599a3 100644 (file)
@@ -7023,15 +7023,4 @@ static struct pci_driver rtl8169_pci_driver = {
        .driver.pm      = RTL8169_PM_OPS,
 };
 
-static int __init rtl8169_init_module(void)
-{
-       return pci_register_driver(&rtl8169_pci_driver);
-}
-
-static void __exit rtl8169_cleanup_module(void)
-{
-       pci_unregister_driver(&rtl8169_pci_driver);
-}
-
-module_init(rtl8169_init_module);
-module_exit(rtl8169_cleanup_module);
+module_pci_driver(rtl8169_pci_driver);