aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/opticon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/opticon.c')
-rw-r--r--drivers/usb/serial/opticon.c25
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
610static struct usb_serial_driver opticon_device = { 609static 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
632static int __init opticon_init(void) 630static 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
645static void __exit opticon_exit(void) 634module_usb_serial_driver(opticon_driver, serial_drivers);
646{
647 usb_deregister(&opticon_driver);
648 usb_serial_deregister(&opticon_device);
649}
650 635
651module_init(opticon_init);
652module_exit(opticon_exit);
653MODULE_DESCRIPTION(DRIVER_DESC); 636MODULE_DESCRIPTION(DRIVER_DESC);
654MODULE_LICENSE("GPL"); 637MODULE_LICENSE("GPL");
655 638