aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorSachin Kamat2013-05-16 17:48:08 +0000
committerDavid S. Miller2013-05-17 14:18:35 -0700
commitb4236daa410e4e778a938ac1151bf94d94c55efc (patch)
tree71e8ce7cc0f88702afd937593fcfde8a36498591 /drivers/net/usb
parent18cf1f1270e7f01be5217203c9f46c5d88a54839 (diff)
net/usb: r8152: Use module_usb_driver()
module_usb_driver() eliminates boilerplate and simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Realtek linux nic maintainers <nic_swsd@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/r8152.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 8e53e4110811..d02bac82fc57 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);