summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-28 13:12:22 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-28 13:12:22 -0800
commitdb55a0492d87c80d8d9a5cf330c58dee55757cba (patch)
tree74bd27a7f3ea65dcd1bb9a184715ff25373b8781 /drivers
parent9334c4c16e6fa80dc55865897337b49c1753f33b (diff)
downloadlinux-db55a0492d87c80d8d9a5cf330c58dee55757cba.tar.gz
linux-db55a0492d87c80d8d9a5cf330c58dee55757cba.tar.bz2
linux-db55a0492d87c80d8d9a5cf330c58dee55757cba.zip
USB: serial: oti6858.c: use module_usb_serial_driver
This converts the oti6858.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: Johan Hovold <jhovold@gmail.com> 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')
-rw-r--r--drivers/usb/serial/oti6858.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index 53f2768c9a36..5fdc33c6a3c0 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -958,20 +958,7 @@ static void oti6858_write_bulk_callback(struct urb *urb)
}
}
-/* module description and (de)initialization */
-
-static int __init oti6858_init(void)
-{
- return usb_serial_register_drivers(&oti6858_driver, serial_drivers);
-}
-
-static void __exit oti6858_exit(void)
-{
- usb_serial_deregister_drivers(&oti6858_driver, serial_drivers);
-}
-
-module_init(oti6858_init);
-module_exit(oti6858_exit);
+module_usb_serial_driver(oti6858_driver, serial_drivers);
MODULE_DESCRIPTION(OTI6858_DESCRIPTION);
MODULE_AUTHOR(OTI6858_AUTHOR);