]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
qla3xxx: use module_pci_driver to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 26 Oct 2012 05:02:30 +0000 (05:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Oct 2012 17:35:51 +0000 (13:35 -0400)
Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qla3xxx.c

index df09b1cb742fb211f639e0e6a16d658a768cf7d6..3a17dcc3e9102ac7db67f3473c710c241c8de6f0 100644 (file)
@@ -3953,15 +3953,4 @@ static struct pci_driver ql3xxx_driver = {
        .remove = __devexit_p(ql3xxx_remove),
 };
 
-static int __init ql3xxx_init_module(void)
-{
-       return pci_register_driver(&ql3xxx_driver);
-}
-
-static void __exit ql3xxx_exit(void)
-{
-       pci_unregister_driver(&ql3xxx_driver);
-}
-
-module_init(ql3xxx_init_module);
-module_exit(ql3xxx_exit);
+module_pci_driver(ql3xxx_driver);