diff options
Diffstat (limited to 'drivers/usb/serial/ssu100.c')
-rw-r--r-- | drivers/usb/serial/ssu100.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index 7697858d8858..ab8842107a8b 100644 --- a/drivers/usb/serial/ssu100.c +++ b/drivers/usb/serial/ssu100.c @@ -70,7 +70,6 @@ static struct usb_driver ssu100_driver = { .id_table = id_table, .suspend = usb_serial_suspend, .resume = usb_serial_resume, - .no_dynamic_id = 1, .supports_autosuspend = 1, }; @@ -677,7 +676,6 @@ static struct usb_serial_driver ssu100_device = { }, .description = DRIVER_DESC, .id_table = id_table, - .usb_driver = &ssu100_driver, .num_ports = 1, .open = ssu100_open, .close = ssu100_close, @@ -693,37 +691,26 @@ static struct usb_serial_driver ssu100_device = { .disconnect = usb_serial_generic_disconnect, }; +static struct usb_serial_driver * const serial_drivers[] = { + &ssu100_device, NULL +}; + static int __init ssu100_init(void) { int retval; dbg("%s", __func__); - /* register with usb-serial */ - retval = usb_serial_register(&ssu100_device); - - if (retval) - goto failed_usb_sio_register; - - retval = usb_register(&ssu100_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(&ssu100_device); -failed_usb_sio_register: + 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_deregister(&ssu100_driver); - usb_serial_deregister(&ssu100_device); + usb_serial_deregister_drivers(&ssu100_driver, serial_drivers); } module_init(ssu100_init); |