From: Sachin Kamat <sachin.kamat@linaro.org>
To: netdev@vger.kernel.org
Cc: nic_swsd@realtek.com, hayeswang@realtek.com, davem@davemloft.net,
sachin.kamat@linaro.org
Subject: [PATCH 2/2] net/usb: r8152: Use module_usb_driver()
Date: Mon, 13 May 2013 10:25:23 +0530 [thread overview]
Message-ID: <1368420923-32222-2-git-send-email-sachin.kamat@linaro.org> (raw)
In-Reply-To: <1368420923-32222-1-git-send-email-sachin.kamat@linaro.org>
module_usb_driver() eliminates boilerplate and simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/net/usb/r8152.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 8e53e41..d02bac8 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1748,18 +1748,7 @@ static struct usb_driver rtl8152_driver = {
.resume = rtl8152_resume
};
-static int __init usb_rtl8152_init(void)
-{
- return usb_register(&rtl8152_driver);
-}
-
-static void __exit usb_rtl8152_exit(void)
-{
- usb_deregister(&rtl8152_driver);
-}
-
-module_init(usb_rtl8152_init);
-module_exit(usb_rtl8152_exit);
+module_usb_driver(rtl8152_driver);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
--
1.7.9.5
prev parent reply other threads:[~2013-05-13 5:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 4:55 [PATCH 1/2] net/usb: r8152: Remove redundant version.h header inclusion Sachin Kamat
2013-05-13 4:55 ` Sachin Kamat [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=1368420923-32222-2-git-send-email-sachin.kamat@linaro.org \
--to=sachin.kamat@linaro.org \
--cc=davem@davemloft.net \
--cc=hayeswang@realtek.com \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
/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).