diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-02-23 14:57:18 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-24 15:39:20 -0500 |
commit | f667ddad41e303ebc2c6d5bf3105dffe2fbdd717 (patch) | |
tree | 4f1391375183b38ef74bafed9a71f7f140c6c510 /drivers/usb/serial/opticon.c | |
parent | 4d2a7aff1062048ea59214b49ca1d915586d6d6d (diff) |
usb-serial: use new registration API in [n-p]* drivers
This patch (as1527) modifies the following usb-serial drivers to
utilize the new usb_serial_{de}register_drivers() routines:
navman, omninet, opticon, option, oti6858, and pl2303.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/opticon.c')
-rw-r--r-- | drivers/usb/serial/opticon.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index 262ded9e076b..7001ad779b94 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,23 +627,18 @@ static struct usb_serial_driver opticon_device = { | |||
629 | .tiocmset = opticon_tiocmset, | 627 | .tiocmset = opticon_tiocmset, |
630 | }; | 628 | }; |
631 | 629 | ||
630 | static struct usb_serial_driver * const serial_drivers[] = { | ||
631 | &opticon_device, NULL | ||
632 | }; | ||
633 | |||
632 | static int __init opticon_init(void) | 634 | static int __init opticon_init(void) |
633 | { | 635 | { |
634 | int retval; | 636 | return usb_serial_register_drivers(&opticon_driver, serial_drivers); |
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 | } | 637 | } |
644 | 638 | ||
645 | static void __exit opticon_exit(void) | 639 | static void __exit opticon_exit(void) |
646 | { | 640 | { |
647 | usb_deregister(&opticon_driver); | 641 | usb_serial_deregister_drivers(&opticon_driver, serial_drivers); |
648 | usb_serial_deregister(&opticon_device); | ||
649 | } | 642 | } |
650 | 643 | ||
651 | module_init(opticon_init); | 644 | module_init(opticon_init); |