diff options
author | Peter Hüwe <PeterHuewe@gmx.de> | 2013-05-21 17:42:55 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-23 01:35:05 +0400 |
commit | 65c21912b5b977f32a12336e87fe32f36105b981 (patch) | |
tree | ad40503edef25a3f6779ee9562d8087d22aaa2ab /drivers/net/ethernet/chelsio/cxgb/cxgb2.c | |
parent | 30d05f9ef7c2caa7efd8ca5c0698ff5e9d5542ae (diff) | |
download | linux-65c21912b5b977f32a12336e87fe32f36105b981.tar.xz |
net/ethernet/chelsio/cxgb/cxgb2: Use module_pci_driver to register driver
Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.
The name of the pci_driver struct had to be changed in order to prevent
a build failure.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb/cxgb2.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c index 9624cfe7df57..d7048db9863d 100644 --- a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c +++ b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c @@ -1351,22 +1351,11 @@ static void remove_one(struct pci_dev *pdev) t1_sw_reset(pdev); } -static struct pci_driver driver = { +static struct pci_driver cxgb_pci_driver = { .name = DRV_NAME, .id_table = t1_pci_tbl, .probe = init_one, .remove = remove_one, }; -static int __init t1_init_module(void) -{ - return pci_register_driver(&driver); -} - -static void __exit t1_cleanup_module(void) -{ - pci_unregister_driver(&driver); -} - -module_init(t1_init_module); -module_exit(t1_cleanup_module); +module_pci_driver(cxgb_pci_driver); |