Skip to content

Commit

Permalink
RDMA/amso1100: Use module_pci_driver() to simplify the code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Roland Dreier committed Feb 15, 2013
1 parent 836dc9e commit 8ab10f7
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/infiniband/hw/amso1100/c2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 8ab10f7

Please sign in to comment.