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>
This commit is contained in:
Sachin Kamat 2013-05-16 17:48:08 +00:00 committed by David S. Miller
parent 18cf1f1270
commit b4236daa41
1 changed files with 1 additions and 12 deletions

View File

@ -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);