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 12:39:20 -0800 |
commit | f667ddad41e303ebc2c6d5bf3105dffe2fbdd717 (patch) | |
tree | 4f1391375183b38ef74bafed9a71f7f140c6c510 /drivers/usb/serial/pl2303.c | |
parent | 4d2a7aff1062048ea59214b49ca1d915586d6d6d (diff) | |
download | blackbird-obmc-linux-f667ddad41e303ebc2c6d5bf3105dffe2fbdd717.tar.gz blackbird-obmc-linux-f667ddad41e303ebc2c6d5bf3105dffe2fbdd717.zip |
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 = { .id_table = id_table, .suspend = usb_serial_suspend, .resume = usb_serial_resume, - .no_dynamic_id = 1, .supports_autosuspend = 1, }; @@ -834,7 +833,6 @@ static struct usb_serial_driver pl2303_device = { .name = "pl2303", }, .id_table = id_table, - .usb_driver = &pl2303_driver, .num_ports = 1, .bulk_in_size = 256, .bulk_out_size = 256, @@ -853,28 +851,23 @@ static struct usb_serial_driver pl2303_device = { .release = pl2303_release, }; +static struct usb_serial_driver * const serial_drivers[] = { + &pl2303_device, NULL +}; + static int __init pl2303_init(void) { int retval; - retval = usb_serial_register(&pl2303_device); - if (retval) - goto failed_usb_serial_register; - retval = usb_register(&pl2303_driver); - if (retval) - goto failed_usb_register; - printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); - return 0; -failed_usb_register: - usb_serial_deregister(&pl2303_device); -failed_usb_serial_register: + retval = usb_serial_register_drivers(&pl2303_driver, serial_drivers); + if (retval == 0) + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); return retval; } static void __exit pl2303_exit(void) { - usb_deregister(&pl2303_driver); - usb_serial_deregister(&pl2303_device); + usb_serial_deregister_drivers(&pl2303_driver, serial_drivers); } module_init(pl2303_init); |