From 5b0a3b7eb37730c369cc47783549dcf6f54a1cd0 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 14 Apr 2012 10:38:36 +0800 Subject: net/wireless: use module_pci_driver This patch converts the drivers in drivers/net/wireless/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin Cc: "John W. Linville" Cc: Jiri Slaby Cc: Nick Kossifidis Cc: "Luis R. Rodriguez" Cc: Simon Kelley Cc: Jouni Malinen Cc: Lennert Buytenhek Cc: Christian Lamparter Cc: Ivo van Doorn Cc: Larry Finger Cc: linux-wireless@vger.kernel.org Acked-by: Lennert Buytenhek Signed-off-by: John W. Linville --- drivers/net/wireless/hostap/hostap_pci.c | 16 +--------------- drivers/net/wireless/hostap/hostap_plx.c | 16 +--------------- 2 files changed, 2 insertions(+), 30 deletions(-) (limited to 'drivers/net/wireless/hostap') diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c index 972a9c3..05ca340 100644 --- a/drivers/net/wireless/hostap/hostap_pci.c +++ b/drivers/net/wireless/hostap/hostap_pci.c @@ -457,18 +457,4 @@ static struct pci_driver prism2_pci_driver = { #endif /* CONFIG_PM */ }; - -static int __init init_prism2_pci(void) -{ - return pci_register_driver(&prism2_pci_driver); -} - - -static void __exit exit_prism2_pci(void) -{ - pci_unregister_driver(&prism2_pci_driver); -} - - -module_init(init_prism2_pci); -module_exit(exit_prism2_pci); +module_pci_driver(prism2_pci_driver); diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c index 33e7903..c3d067e 100644 --- a/drivers/net/wireless/hostap/hostap_plx.c +++ b/drivers/net/wireless/hostap/hostap_plx.c @@ -616,18 +616,4 @@ static struct pci_driver prism2_plx_driver = { .remove = prism2_plx_remove, }; - -static int __init init_prism2_plx(void) -{ - return pci_register_driver(&prism2_plx_driver); -} - - -static void __exit exit_prism2_plx(void) -{ - pci_unregister_driver(&prism2_plx_driver); -} - - -module_init(init_prism2_plx); -module_exit(exit_prism2_plx); +module_pci_driver(prism2_plx_driver); -- cgit v1.1