From: "Jiri Slaby (SUSE)" <jirislaby@kernel•org>
To: gregkh@linuxfoundation•org
Cc: Rich Felker <dalias@libc•org>,
Yoshinori Sato <ysato@users•sourceforge.jp>,
linux-sh@vger•kernel.org,
Thomas Winischhofer <thomas@winischhofer•net>,
linux-kernel@vger•kernel.org, linuxppc-dev@lists•ozlabs.org,
linux-usb@vger•kernel.org, Nicholas Piggin <npiggin@gmail•com>,
linux-serial@vger•kernel.org,
"Jiri Slaby \(SUSE\)" <jirislaby@kernel•org>
Subject: [PATCH 3/3] USB: sisusbvga: use module_usb_driver()
Date: Thu, 8 Dec 2022 10:07:48 +0100 [thread overview]
Message-ID: <20221208090749.28056-3-jirislaby@kernel.org> (raw)
In-Reply-To: <20221208090749.28056-1-jirislaby@kernel.org>
Now, that we only do usb_register() and usb_sisusb_exit() in
module_init() and module_exit() respectivelly, we can simply use
module_usb_driver().
Cc: Michael Ellerman <mpe@ellerman•id.au>
Cc: Nicholas Piggin <npiggin@gmail•com>
Cc: Christophe Leroy <christophe.leroy@csgroup•eu>
Cc: Yoshinori Sato <ysato@users•sourceforge.jp>
Cc: Rich Felker <dalias@libc•org>
Cc: Thomas Winischhofer <thomas@winischhofer•net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
Cc: linuxppc-dev@lists•ozlabs.org
Cc: linux-sh@vger•kernel.org
Cc: linux-usb@vger•kernel.org
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel•org>
---
drivers/usb/misc/sisusbvga/sisusbvga.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/usb/misc/sisusbvga/sisusbvga.c b/drivers/usb/misc/sisusbvga/sisusbvga.c
index a0d5ba8058f8..654a79fd3231 100644
--- a/drivers/usb/misc/sisusbvga/sisusbvga.c
+++ b/drivers/usb/misc/sisusbvga/sisusbvga.c
@@ -2947,18 +2947,7 @@ static struct usb_driver sisusb_driver = {
.id_table = sisusb_table,
};
-static int __init usb_sisusb_init(void)
-{
- return usb_register(&sisusb_driver);
-}
-
-static void __exit usb_sisusb_exit(void)
-{
- usb_deregister(&sisusb_driver);
-}
-
-module_init(usb_sisusb_init);
-module_exit(usb_sisusb_exit);
+module_usb_driver(sisusb_driver);
MODULE_AUTHOR("Thomas Winischhofer <thomas@winischhofer•net>");
MODULE_DESCRIPTION("sisusbvga - Driver for Net2280/SiS315-based USB2VGA dongles");
--
2.38.1
prev parent reply other threads:[~2022-12-08 9:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 9:07 [PATCH 1/3] USB: sisusbvga: remove console support Jiri Slaby (SUSE)
2022-12-08 9:07 ` [PATCH 2/3] USB: sisusbvga: rename sisusb.c to sisusbvga.c Jiri Slaby (SUSE)
2022-12-08 9:07 ` Jiri Slaby (SUSE) [this message]
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=20221208090749.28056-3-jirislaby@kernel.org \
--to=jirislaby@kernel$(echo .)org \
--cc=dalias@libc$(echo .)org \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-serial@vger$(echo .)kernel.org \
--cc=linux-sh@vger$(echo .)kernel.org \
--cc=linux-usb@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=npiggin@gmail$(echo .)com \
--cc=thomas@winischhofer$(echo .)net \
--cc=ysato@users$(echo .)sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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