diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-02-23 23:56:57 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-25 00:39:18 +0400 |
commit | 7dbe2460989b10644651e779b17b683627feea48 (patch) | |
tree | 51ab97a04dfdcea7e71cbc5e8953efab69714b90 /drivers/usb/serial/io_edgeport.c | |
parent | 97b6b6d2339f67eb17d954930a908b762af66228 (diff) | |
download | linux-7dbe2460989b10644651e779b17b683627feea48.tar.xz |
usb-serial: use new registration API in [i-j]* drivers
This patch (as1525) modifies the following usb-serial drivers to
utilize the new usb_serial_{de}register_drivers() routines:
io_edgeport, io_ti, ipaq, ipw, ir-usb, and iuu_phoenix.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/io_edgeport.c')
-rw-r--r-- | drivers/usb/serial/io_edgeport.c | 41 |
1 files changed, 7 insertions, 34 deletions
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 616b07862771..55afa233aacd 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c @@ -3189,35 +3189,12 @@ static int __init edgeport_init(void) { int retval; - retval = usb_serial_register(&edgeport_2port_device); - if (retval) - goto failed_2port_device_register; - retval = usb_serial_register(&edgeport_4port_device); - if (retval) - goto failed_4port_device_register; - retval = usb_serial_register(&edgeport_8port_device); - if (retval) - goto failed_8port_device_register; - retval = usb_serial_register(&epic_device); - if (retval) - goto failed_epic_device_register; - retval = usb_register(&io_driver); - if (retval) - goto failed_usb_register; - atomic_set(&CmdUrbs, 0); - printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" - DRIVER_DESC "\n"); - return 0; - -failed_usb_register: - usb_serial_deregister(&epic_device); -failed_epic_device_register: - usb_serial_deregister(&edgeport_8port_device); -failed_8port_device_register: - usb_serial_deregister(&edgeport_4port_device); -failed_4port_device_register: - usb_serial_deregister(&edgeport_2port_device); -failed_2port_device_register: + retval = usb_serial_register_drivers(&io_driver, serial_drivers); + if (retval == 0) { + atomic_set(&CmdUrbs, 0); + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" + DRIVER_DESC "\n"); + } return retval; } @@ -3228,11 +3205,7 @@ failed_2port_device_register: ****************************************************************************/ static void __exit edgeport_exit (void) { - usb_deregister(&io_driver); - usb_serial_deregister(&edgeport_2port_device); - usb_serial_deregister(&edgeport_4port_device); - usb_serial_deregister(&edgeport_8port_device); - usb_serial_deregister(&epic_device); + usb_serial_deregister_drivers(&io_driver, serial_drivers); } module_init(edgeport_init); |