From: Wei Yongjun Date: Wed, 10 Oct 2012 13:10:43 +0000 (+0000) Subject: RDMA/amso1100: Use module_pci_driver() to simplify the code X-Git-Tag: firefly_0821_release~3680^2~1025^2^5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8ab10f75372fc59b95d96af40b9a3b4c2a0da059;p=firefly-linux-kernel-4.4.55.git RDMA/amso1100: Use module_pci_driver() to simplify the code 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 Reviewed-by: Steve WIse Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c index 7275e727e0f5..d53cf519f42a 100644 --- a/drivers/infiniband/hw/amso1100/c2.c +++ b/drivers/infiniband/hw/amso1100/c2.c @@ -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);