diff options
Diffstat (limited to 'drivers/usb/serial/ti_usb_3410_5052.c')
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 74f2c7746cc4..ab74123d658e 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -216,7 +216,6 @@ static struct usb_driver ti_usb_driver = { .probe = usb_serial_probe, .disconnect = usb_serial_disconnect, .id_table = ti_id_table_combined, - .no_dynamic_id = 1, }; static struct usb_serial_driver ti_1port_device = { @@ -225,7 +224,6 @@ static struct usb_serial_driver ti_1port_device = { .name = "ti_usb_3410_5052_1", }, .description = "TI USB 3410 1 port adapter", - .usb_driver = &ti_usb_driver, .id_table = ti_id_table_3410, .num_ports = 1, .attach = ti_startup, @@ -254,7 +252,6 @@ static struct usb_serial_driver ti_2port_device = { .name = "ti_usb_3410_5052_2", }, .description = "TI USB 5052 2 port adapter", - .usb_driver = &ti_usb_driver, .id_table = ti_id_table_5052, .num_ports = 2, .attach = ti_startup, @@ -277,6 +274,9 @@ static struct usb_serial_driver ti_2port_device = { .write_bulk_callback = ti_bulk_out_callback, }; +static struct usb_serial_driver * const serial_drivers[] = { + &ti_1port_device, &ti_2port_device, NULL +}; /* Module */ @@ -344,36 +344,17 @@ static int __init ti_init(void) ti_id_table_combined[c].match_flags = USB_DEVICE_ID_MATCH_DEVICE; } - ret = usb_serial_register(&ti_1port_device); - if (ret) - goto failed_1port; - ret = usb_serial_register(&ti_2port_device); - if (ret) - goto failed_2port; - - ret = usb_register(&ti_usb_driver); - if (ret) - goto failed_usb; - - printk(KERN_INFO KBUILD_MODNAME ": " TI_DRIVER_VERSION ":" - TI_DRIVER_DESC "\n"); - - return 0; - -failed_usb: - usb_serial_deregister(&ti_2port_device); -failed_2port: - usb_serial_deregister(&ti_1port_device); -failed_1port: + ret = usb_serial_register_drivers(&ti_usb_driver, serial_drivers); + if (ret == 0) + printk(KERN_INFO KBUILD_MODNAME ": " TI_DRIVER_VERSION ":" + TI_DRIVER_DESC "\n"); return ret; } static void __exit ti_exit(void) { - usb_deregister(&ti_usb_driver); - usb_serial_deregister(&ti_1port_device); - usb_serial_deregister(&ti_2port_device); + usb_serial_deregister_drivers(&ti_usb_driver, serial_drivers); } |