From: Rosen Penev <rosenp@gmail.com>
To: linux-wireless@vger.kernel.org
Subject: [PATCH 2/2] wifi: purelifi: use module_usb_driver
Date: Sat, 26 Aug 2023 13:09:06 -0700 [thread overview]
Message-ID: <20230826200929.9756-2-rosenp@gmail.com> (raw)
In-Reply-To: <20230826200929.9756-1-rosenp@gmail.com>
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>
---
drivers/net/wireless/purelifi/plfxlc/usb.c | 23 +---------------------
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/drivers/net/wireless/purelifi/plfxlc/usb.c b/drivers/net/wireless/purelifi/plfxlc/usb.c
index 76d0a778636a..b4bb32911d9f 100644
--- a/drivers/net/wireless/purelifi/plfxlc/usb.c
+++ b/drivers/net/wireless/purelifi/plfxlc/usb.c
@@ -861,26 +861,6 @@ static struct usb_driver driver = {
.disable_hub_initiated_lpm = 1,
};
-static int __init usb_init(void)
-{
- int r;
-
- r = usb_register(&driver);
- if (r) {
- pr_err("%s usb_register() failed %d\n", driver.name, r);
- return r;
- }
-
- pr_debug("Driver initialized :%s\n", driver.name);
- return 0;
-}
-
-static void __exit usb_exit(void)
-{
- usb_deregister(&driver);
- pr_debug("%s %s\n", driver.name, __func__);
-}
-
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("USB driver for pureLiFi devices");
MODULE_AUTHOR("pureLiFi");
@@ -888,5 +868,4 @@ MODULE_VERSION("1.0");
MODULE_FIRMWARE("plfxlc/lifi-x.bin");
MODULE_DEVICE_TABLE(usb, usb_ids);
-module_init(usb_init);
-module_exit(usb_exit);
+module_usb_driver(driver);
--
2.41.0
next prev parent reply other threads:[~2023-08-26 20:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-26 20:09 [PATCH 1/2] wifi: ath9k_htc: use module_usb_driver Rosen Penev
2023-08-26 20:09 ` Rosen Penev [this message]
2023-09-04 17:31 ` [2/2] wifi: plfxlc: use module_usb_driver() Kalle Valo
2023-08-27 0:38 ` [PATCH 1/2] wifi: ath9k_htc: use module_usb_driver kernel test robot
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=20230826200929.9756-2-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=linux-wireless@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).