RDMA/amso1100: Use module_pci_driver() to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 10 Oct 2012 13:10:43 +0000 (13:10 +0000)
committerRoland Dreier <roland@purestorage.com>
Fri, 15 Feb 2013 23:16:10 +0000 (15:16 -0800)
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>
Reviewed-by: Steve WIse <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/amso1100/c2.c

index 7275e727e0f56e49f8a4671cd3935d44e40b9fe8..d53cf519f42a4267bcfecf487343150eed1cc7f9 100644 (file)
@@ -1238,15 +1238,4 @@ static struct pci_driver c2_pci_driver = {
        .remove = c2_remove,
 };
 
-static int __init c2_init_module(void)
-{
-       return pci_register_driver(&c2_pci_driver);
-}
-
-static void __exit c2_exit_module(void)
-{
-       pci_unregister_driver(&c2_pci_driver);
-}
-
-module_init(c2_init_module);
-module_exit(c2_exit_module);
+module_pci_driver(c2_pci_driver);