summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/ssu100.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-29 01:12:36 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-29 01:12:36 +0400
commit3a67460715481772068aebf8c945667c285f2207 (patch)
tree6297eb5a20407f79960aa2a053bcbda500c75fea /drivers/usb/serial/ssu100.c
parenta385c150a49e8ef49cd27318a6fd7759ed6bfa42 (diff)
downloadlinux-3a67460715481772068aebf8c945667c285f2207.tar.xz
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 <rusty@rustcorp.com.au> CC: Alan Stern <stern@rowland.harvard.edu> CC: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/ssu100.c')
-rw-r--r--drivers/usb/serial/ssu100.c21
1 files changed, 1 insertions, 20 deletions
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");