aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/spcp8x5.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/spcp8x5.c')
-rw-r--r--drivers/usb/serial/spcp8x5.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c
index d7f5eee18f00..af898937d4b1 100644
--- a/drivers/usb/serial/spcp8x5.c
+++ b/drivers/usb/serial/spcp8x5.c
@@ -156,7 +156,6 @@ static struct usb_driver spcp8x5_driver = {
156 .probe = usb_serial_probe, 156 .probe = usb_serial_probe,
157 .disconnect = usb_serial_disconnect, 157 .disconnect = usb_serial_disconnect,
158 .id_table = id_table, 158 .id_table = id_table,
159 .no_dynamic_id = 1,
160}; 159};
161 160
162 161
@@ -649,7 +648,6 @@ static struct usb_serial_driver spcp8x5_device = {
649 .name = "SPCP8x5", 648 .name = "SPCP8x5",
650 }, 649 },
651 .id_table = id_table, 650 .id_table = id_table,
652 .usb_driver = &spcp8x5_driver,
653 .num_ports = 1, 651 .num_ports = 1,
654 .open = spcp8x5_open, 652 .open = spcp8x5_open,
655 .dtr_rts = spcp8x5_dtr_rts, 653 .dtr_rts = spcp8x5_dtr_rts,
@@ -664,28 +662,24 @@ static struct usb_serial_driver spcp8x5_device = {
664 .process_read_urb = spcp8x5_process_read_urb, 662 .process_read_urb = spcp8x5_process_read_urb,
665}; 663};
666 664
665static struct usb_serial_driver * const serial_drivers[] = {
666 &spcp8x5_device, NULL
667};
668
667static int __init spcp8x5_init(void) 669static int __init spcp8x5_init(void)
668{ 670{
669 int retval; 671 int retval;
670 retval = usb_serial_register(&spcp8x5_device); 672
671 if (retval) 673 retval = usb_serial_register_drivers(&spcp8x5_driver, serial_drivers);
672 goto failed_usb_serial_register; 674 if (retval == 0)
673 retval = usb_register(&spcp8x5_driver); 675 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
674 if (retval) 676 DRIVER_DESC "\n");
675 goto failed_usb_register;
676 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
677 DRIVER_DESC "\n");
678 return 0;
679failed_usb_register:
680 usb_serial_deregister(&spcp8x5_device);
681failed_usb_serial_register:
682 return retval; 677 return retval;
683} 678}
684 679
685static void __exit spcp8x5_exit(void) 680static void __exit spcp8x5_exit(void)
686{ 681{
687 usb_deregister(&spcp8x5_driver); 682 usb_serial_deregister_drivers(&spcp8x5_driver, serial_drivers);
688 usb_serial_deregister(&spcp8x5_device);
689} 683}
690 684
691module_init(spcp8x5_init); 685module_init(spcp8x5_init);