diff options
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 4cc36c7..0d5d302 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); |