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/pl2303.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/pl2303.c')
-rw-r--r-- | drivers/usb/serial/pl2303.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 3d8cda57ce7a..cc65d810c8f5 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -104,7 +104,6 @@ static struct usb_driver pl2303_driver = { | |||
104 | .id_table = id_table, | 104 | .id_table = id_table, |
105 | .suspend = usb_serial_suspend, | 105 | .suspend = usb_serial_suspend, |
106 | .resume = usb_serial_resume, | 106 | .resume = usb_serial_resume, |
107 | .no_dynamic_id = 1, | ||
108 | .supports_autosuspend = 1, | 107 | .supports_autosuspend = 1, |
109 | }; | 108 | }; |
110 | 109 | ||
@@ -834,7 +833,6 @@ static struct usb_serial_driver pl2303_device = { | |||
834 | .name = "pl2303", | 833 | .name = "pl2303", |
835 | }, | 834 | }, |
836 | .id_table = id_table, | 835 | .id_table = id_table, |
837 | .usb_driver = &pl2303_driver, | ||
838 | .num_ports = 1, | 836 | .num_ports = 1, |
839 | .bulk_in_size = 256, | 837 | .bulk_in_size = 256, |
840 | .bulk_out_size = 256, | 838 | .bulk_out_size = 256, |
@@ -853,28 +851,23 @@ static struct usb_serial_driver pl2303_device = { | |||
853 | .release = pl2303_release, | 851 | .release = pl2303_release, |
854 | }; | 852 | }; |
855 | 853 | ||
854 | static struct usb_serial_driver * const serial_drivers[] = { | ||
855 | &pl2303_device, NULL | ||
856 | }; | ||
857 | |||
856 | static int __init pl2303_init(void) | 858 | static int __init pl2303_init(void) |
857 | { | 859 | { |
858 | int retval; | 860 | int retval; |
859 | 861 | ||
860 | retval = usb_serial_register(&pl2303_device); | 862 | retval = usb_serial_register_drivers(&pl2303_driver, serial_drivers); |
861 | if (retval) | 863 | if (retval == 0) |
862 | goto failed_usb_serial_register; | 864 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); |
863 | retval = usb_register(&pl2303_driver); | ||
864 | if (retval) | ||
865 | goto failed_usb_register; | ||
866 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); | ||
867 | return 0; | ||
868 | failed_usb_register: | ||
869 | usb_serial_deregister(&pl2303_device); | ||
870 | failed_usb_serial_register: | ||
871 | return retval; | 865 | return retval; |
872 | } | 866 | } |
873 | 867 | ||
874 | static void __exit pl2303_exit(void) | 868 | static void __exit pl2303_exit(void) |
875 | { | 869 | { |
876 | usb_deregister(&pl2303_driver); | 870 | usb_serial_deregister_drivers(&pl2303_driver, serial_drivers); |
877 | usb_serial_deregister(&pl2303_device); | ||
878 | } | 871 | } |
879 | 872 | ||
880 | module_init(pl2303_init); | 873 | module_init(pl2303_init); |