Skip to content

Commit

Permalink
qla3xxx: 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>
Acked-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Oct 31, 2012
1 parent bbd9f9e commit 680d866
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/net/ethernet/qlogic/qla3xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3953,15 +3953,4 @@ static struct pci_driver ql3xxx_driver = {
.remove = __devexit_p(ql3xxx_remove),
};

static int __init ql3xxx_init_module(void)
{
return pci_register_driver(&ql3xxx_driver);
}

static void __exit ql3xxx_exit(void)
{
pci_unregister_driver(&ql3xxx_driver);
}

module_init(ql3xxx_init_module);
module_exit(ql3xxx_exit);
module_pci_driver(ql3xxx_driver);

0 comments on commit 680d866

Please sign in to comment.