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 <rosenp@gmail.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Link: https://patch.msgid.link/20260506234848.189840-1-rosenp@gmail.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
Rosen Penev 2026-05-06 16:48:48 -07:00 committed by Jeff Johnson
parent 0bd50e3635
commit 6a03ff9d57
3 changed files with 1 additions and 29 deletions

View File

@ -1530,12 +1530,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);

View File

@ -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 */

View File

@ -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);