From patchwork Wed Oct 10 13:00:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: atm: he: use module_pci_driver to simplify the code Date: Wed, 10 Oct 2012 03:00:04 -0000 From: Wei Yongjun X-Patchwork-Id: 190635 Message-Id: To: chas@cmf.nrl.navy.mil Cc: yongjun_wei@trendmicro.com.cn, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org From: Wei Yongjun 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 --- drivers/atm/he.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/atm/he.c b/drivers/atm/he.c index b182c2f..e184339 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c @@ -2883,15 +2883,4 @@ static struct pci_driver he_driver = { .id_table = he_pci_tbl, }; -static int __init he_init(void) -{ - return pci_register_driver(&he_driver); -} - -static void __exit he_cleanup(void) -{ - pci_unregister_driver(&he_driver); -} - -module_init(he_init); -module_exit(he_cleanup); +module_pci_driver(he_driver);