[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1368420923-32222-2-git-send-email-sachin.kamat@linaro.org>
Date: Mon, 13 May 2013 10:25:23 +0530
From: Sachin Kamat <sachin.kamat@...aro.org>
To: netdev@...r.kernel.org
Cc: nic_swsd@...ltek.com, hayeswang@...ltek.com, davem@...emloft.net,
sachin.kamat@...aro.org
Subject: [PATCH 2/2] net/usb: r8152: Use module_usb_driver()
module_usb_driver() eliminates boilerplate and simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@...aro.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists