From: Greg Kroah-Hartman Date: Tue, 28 Feb 2012 21:12:36 +0000 (-0800) Subject: USB: serial: ssu100.c: use module_usb_serial_driver X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a67460715481772068aebf8c945667c285f2207;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git USB: serial: ssu100.c: use module_usb_serial_driver This converts the ssu100.c driver to use the module_usb_serial_driver() call instead of having to have a module_init/module_exit function, saving a lot of duplicated code. CC: Rusty Russell CC: Alan Stern CC: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index ab8842107a8b..3cdc8a52de44 100644 --- a/drivers/usb/serial/ssu100.c +++ b/drivers/usb/serial/ssu100.c @@ -695,26 +695,7 @@ static struct usb_serial_driver * const serial_drivers[] = { &ssu100_device, NULL }; -static int __init ssu100_init(void) -{ - int retval; - - dbg("%s", __func__); - - retval = usb_serial_register_drivers(&ssu100_driver, serial_drivers); - if (retval == 0) - printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" - DRIVER_DESC "\n"); - return retval; -} - -static void __exit ssu100_exit(void) -{ - usb_serial_deregister_drivers(&ssu100_driver, serial_drivers); -} - -module_init(ssu100_init); -module_exit(ssu100_exit); +module_usb_serial_driver(ssu100_driver, serial_drivers); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL");