Skip to content

Commit

Permalink
Staging: ipack/bridges/tpci200: use module_pci_driver to simplify the…
Browse files Browse the repository at this point in the history
… 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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Wei Yongjun authored and Greg Kroah-Hartman committed Oct 19, 2012
1 parent 58b2c0c commit 1bc7c1c
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/staging/ipack/carriers/tpci200.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,17 +618,7 @@ static struct pci_driver tpci200_pci_drv = {
.remove = __devexit_p(tpci200_pci_remove),
};

static int __init tpci200_drvr_init_module(void)
{
return pci_register_driver(&tpci200_pci_drv);
}

static void __exit tpci200_drvr_exit_module(void)
{
pci_unregister_driver(&tpci200_pci_drv);
}
module_pci_driver(tpci200_pci_drv);

MODULE_DESCRIPTION("TEWS TPCI-200 device driver");
MODULE_LICENSE("GPL");
module_init(tpci200_drvr_init_module);
module_exit(tpci200_drvr_exit_module);

0 comments on commit 1bc7c1c

Please sign in to comment.