Commit b4236daa authored by Sachin Kamat's avatar Sachin Kamat Committed by David S. Miller

net/usb: r8152: Use module_usb_driver()

module_usb_driver() eliminates boilerplate and simplifies the code.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 18cf1f12
...@@ -1748,18 +1748,7 @@ static struct usb_driver rtl8152_driver = { ...@@ -1748,18 +1748,7 @@ static struct usb_driver rtl8152_driver = {
.resume = rtl8152_resume .resume = rtl8152_resume
}; };
static int __init usb_rtl8152_init(void) module_usb_driver(rtl8152_driver);
{
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_AUTHOR(DRIVER_AUTHOR); MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC); MODULE_DESCRIPTION(DRIVER_DESC);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment