From: Rosen Penev <rosenp@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: "Toke Høiland-Jørgensen" <toke@toke.dk>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCHv2 ath-next] wifi: ath9k_htc: use module_usb_driver
Date: Wed, 6 May 2026 16:48:48 -0700 [thread overview]
Message-ID: <20260506234848.189840-1-rosenp@gmail.com> (raw)
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>
---
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(-)
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 8ae4e5d4fa14..515267f48d80 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -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);
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.h b/drivers/net/wireless/ath/ath9k/hif_usb.h
index c28033ee61ce..dc0b0fa5c325 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.h
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.h
@@ -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 */
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 5270d0c0af17..6de78ae85726 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -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);
--
2.54.0
reply other threads:[~2026-05-06 23:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260506234848.189840-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=toke@toke.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox