wifi: ath9k_htc: use module_usb_driver
PATCH v2 1/1 wifi: ath9k_htc: use module_usb_driver
This follows the pattern with other USB Wifi drivers. There is nothing special being done in the _init and _exit functions here. Simplifies and saves some lines of code.
Signed-off-by Rosen Penev <[email protected]>
---
v2: move module_usb_driver to its proper place.
drivers/net/wireless/ath/ath9k/hif_usb.c | 10 +--------- drivers/net/wireless/ath/ath9k/hif_usb.h | 2 -- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 18 ------------------ 3 files changed, 1 insertion(+), 29 deletions(-)
drivers/net/wireless/ath/ath9k/hif_usb.c +1 -9
@@ -1520,12 +1520,4 @@ static struct usb_driver ath9k_hif_usb_driver = { .disable_hub_initiated_lpm = 1, }; -int ath9k_hif_usb_init (void ) -{ -return usb_register (&ath9k_hif_usb_driver); -} - -void ath9k_hif_usb_exit (void ) -{ -usb_deregister (&ath9k_hif_usb_driver); -} +module_usb_driver (ath9k_hif_usb_driver);
drivers/net/wireless/ath/ath9k/hif_usb.h +0 -2
@@ -136,8 +136,6 @@ struct hif_device_usb { u8 flags; /* HIF_USB_* */ }; -int ath9k_hif_usb_init (void ); -void ath9k_hif_usb_exit (void );void ath9k_hif_usb_dealloc_urbs (struct hif_device_usb *hif_dev);#endif /* HTC_USB_H */
drivers/net/wireless/ath/ath9k/htc_drv_init.c +0 -18
@@ -1021,21 +1021,3 @@ int ath9k_htc_resume(struct htc_target *htc_handle) return ret; }#endif - -static int __init ath9k_htc_init (void ) -{ -if (ath9k_hif_usb_init () <0 ) { -pr_err ("No USB devices found, driver not installed\n" ); -return -ENODEV ; - } - -return 0 ; -} -module_init (ath9k_htc_init); - -static void __exit ath9k_htc_exit(void) -{ -ath9k_hif_usb_exit (); -pr_info ("Driver unloaded\n" ); -} -module_exit (ath9k_htc_exit);
Signature · 1 line
2.54.0
Quoted 5 lines · Rosen Penev
This follows the pattern with other USB Wifi drivers. There is nothing special being done in the
_initand_exitfunctions here. Simplifies and saves some lines of code.Signed-off-by Rosen Penev <[email protected]>
Jeff Johnson
AppliedQuoted 5 lines · Rosen Penev
This follows the pattern with other USB Wifi drivers. There is nothing special being done in the
_initand_exitfunctions here. Simplifies and saves some lines of code.
Applied, thanks!
[1/1] wifi: ath9k_htc: use module_usb_driver
commit: 6a03ff9d5765ab701c12c9fc781fa6de171e1a2e
Best regards,
Signature · 1 line
Jeff Johnson <[email protected]>