diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-02-23 14:57:09 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-24 12:39:19 -0800 |
commit | 4d2a7aff1062048ea59214b49ca1d915586d6d6d (patch) | |
tree | 42e5426b6bb4abeee669d2dd709fb1285836b043 /drivers/usb/serial/keyspan.c | |
parent | 7dbe2460989b10644651e779b17b683627feea48 (diff) |
usb-serial: use new registration API in [k-m]* drivers
This patch (as1526) modifies the following usb-serial drivers to
utilize the new usb_serial_{de}register_drivers() routines:
keyspan, kl5kusb105, kobil_sct, mct_u232, mos7720,
mos7840, and moto_modem.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/keyspan.c')
-rw-r--r-- | drivers/usb/serial/keyspan.c | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index 4cc36c76180..0d5d3025a66 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c @@ -134,45 +134,17 @@ struct keyspan_port_private { static int __init keyspan_init(void) { int retval; - retval = usb_serial_register(&keyspan_pre_device); - if (retval) - goto failed_pre_device_register; - retval = usb_serial_register(&keyspan_1port_device); - if (retval) - goto failed_1port_device_register; - retval = usb_serial_register(&keyspan_2port_device); - if (retval) - goto failed_2port_device_register; - retval = usb_serial_register(&keyspan_4port_device); - if (retval) - goto failed_4port_device_register; - retval = usb_register(&keyspan_driver); - if (retval) - goto failed_usb_register; - - printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" - DRIVER_DESC "\n"); - return 0; -failed_usb_register: - usb_serial_deregister(&keyspan_4port_device); -failed_4port_device_register: - usb_serial_deregister(&keyspan_2port_device); -failed_2port_device_register: - usb_serial_deregister(&keyspan_1port_device); -failed_1port_device_register: - usb_serial_deregister(&keyspan_pre_device); -failed_pre_device_register: + retval = usb_serial_register_drivers(&keyspan_driver, serial_drivers); + if (retval == 0) + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" + DRIVER_DESC "\n"); return retval; } static void __exit keyspan_exit(void) { - usb_deregister(&keyspan_driver); - usb_serial_deregister(&keyspan_pre_device); - usb_serial_deregister(&keyspan_1port_device); - usb_serial_deregister(&keyspan_2port_device); - usb_serial_deregister(&keyspan_4port_device); + usb_serial_deregister_drivers(&keyspan_driver, serial_drivers); } module_init(keyspan_init); |