diff options
Diffstat (limited to 'drivers/usb/serial/opticon.c')
-rw-r--r-- | drivers/usb/serial/opticon.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index 262ded9e076b..82cc9d202b83 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c | |||
@@ -604,7 +604,6 @@ static struct usb_driver opticon_driver = { | |||
604 | .suspend = opticon_suspend, | 604 | .suspend = opticon_suspend, |
605 | .resume = opticon_resume, | 605 | .resume = opticon_resume, |
606 | .id_table = id_table, | 606 | .id_table = id_table, |
607 | .no_dynamic_id = 1, | ||
608 | }; | 607 | }; |
609 | 608 | ||
610 | static struct usb_serial_driver opticon_device = { | 609 | static struct usb_serial_driver opticon_device = { |
@@ -613,7 +612,6 @@ static struct usb_serial_driver opticon_device = { | |||
613 | .name = "opticon", | 612 | .name = "opticon", |
614 | }, | 613 | }, |
615 | .id_table = id_table, | 614 | .id_table = id_table, |
616 | .usb_driver = &opticon_driver, | ||
617 | .num_ports = 1, | 615 | .num_ports = 1, |
618 | .attach = opticon_startup, | 616 | .attach = opticon_startup, |
619 | .open = opticon_open, | 617 | .open = opticon_open, |
@@ -629,27 +627,12 @@ static struct usb_serial_driver opticon_device = { | |||
629 | .tiocmset = opticon_tiocmset, | 627 | .tiocmset = opticon_tiocmset, |
630 | }; | 628 | }; |
631 | 629 | ||
632 | static int __init opticon_init(void) | 630 | static struct usb_serial_driver * const serial_drivers[] = { |
633 | { | 631 | &opticon_device, NULL |
634 | int retval; | 632 | }; |
635 | |||
636 | retval = usb_serial_register(&opticon_device); | ||
637 | if (retval) | ||
638 | return retval; | ||
639 | retval = usb_register(&opticon_driver); | ||
640 | if (retval) | ||
641 | usb_serial_deregister(&opticon_device); | ||
642 | return retval; | ||
643 | } | ||
644 | 633 | ||
645 | static void __exit opticon_exit(void) | 634 | module_usb_serial_driver(opticon_driver, serial_drivers); |
646 | { | ||
647 | usb_deregister(&opticon_driver); | ||
648 | usb_serial_deregister(&opticon_device); | ||
649 | } | ||
650 | 635 | ||
651 | module_init(opticon_init); | ||
652 | module_exit(opticon_exit); | ||
653 | MODULE_DESCRIPTION(DRIVER_DESC); | 636 | MODULE_DESCRIPTION(DRIVER_DESC); |
654 | MODULE_LICENSE("GPL"); | 637 | MODULE_LICENSE("GPL"); |
655 | 638 | ||