diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-18 23:18:46 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-19 11:45:35 -0700 |
commit | 1bc7c1c71d7f84baff254868222312bf14915128 (patch) | |
tree | 7236823f8b1df2036579746ad474140a5a2f6312 | |
parent | 58b2c0ca0bd16ddefd1d981fe8748ca8083294c6 (diff) | |
download | linux-3.10-1bc7c1c71d7f84baff254868222312bf14915128.tar.gz linux-3.10-1bc7c1c71d7f84baff254868222312bf14915128.tar.bz2 linux-3.10-1bc7c1c71d7f84baff254868222312bf14915128.zip |
Staging: ipack/bridges/tpci200: 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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/ipack/carriers/tpci200.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/staging/ipack/carriers/tpci200.c b/drivers/staging/ipack/carriers/tpci200.c index 376e79410e9..829fd1ac8f8 100644 --- a/drivers/staging/ipack/carriers/tpci200.c +++ b/drivers/staging/ipack/carriers/tpci200.c @@ -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); |