aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/io_edgeport.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-02-23 14:56:57 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-24 15:39:18 -0500
commit7dbe2460989b10644651e779b17b683627feea48 (patch)
tree51ab97a04dfdcea7e71cbc5e8953efab69714b90 /drivers/usb/serial/io_edgeport.c
parent97b6b6d2339f67eb17d954930a908b762af66228 (diff)
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.c41
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)
3189{ 3189{
3190 int retval; 3190 int retval;
3191 3191
3192 retval = usb_serial_register(&edgeport_2port_device); 3192 retval = usb_serial_register_drivers(&io_driver, serial_drivers);
3193 if (retval) 3193 if (retval == 0) {
3194 goto failed_2port_device_register; 3194 atomic_set(&CmdUrbs, 0);
3195 retval = usb_serial_register(&edgeport_4port_device); 3195 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
3196 if (retval) 3196 DRIVER_DESC "\n");
3197 goto failed_4port_device_register; 3197 }
3198 retval = usb_serial_register(&edgeport_8port_device);
3199 if (retval)
3200 goto failed_8port_device_register;
3201 retval = usb_serial_register(&epic_device);
3202 if (retval)
3203 goto failed_epic_device_register;
3204 retval = usb_register(&io_driver);
3205 if (retval)
3206 goto failed_usb_register;
3207 atomic_set(&CmdUrbs, 0);
3208 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
3209 DRIVER_DESC "\n");
3210 return 0;
3211
3212failed_usb_register:
3213 usb_serial_deregister(&epic_device);
3214failed_epic_device_register:
3215 usb_serial_deregister(&edgeport_8port_device);
3216failed_8port_device_register:
3217 usb_serial_deregister(&edgeport_4port_device);
3218failed_4port_device_register:
3219 usb_serial_deregister(&edgeport_2port_device);
3220failed_2port_device_register:
3221 return retval; 3198 return retval;
3222} 3199}
3223 3200
@@ -3228,11 +3205,7 @@ failed_2port_device_register:
3228 ****************************************************************************/ 3205 ****************************************************************************/
3229static void __exit edgeport_exit (void) 3206static void __exit edgeport_exit (void)
3230{ 3207{
3231 usb_deregister(&io_driver); 3208 usb_serial_deregister_drivers(&io_driver, serial_drivers);
3232 usb_serial_deregister(&edgeport_2port_device);
3233 usb_serial_deregister(&edgeport_4port_device);
3234 usb_serial_deregister(&edgeport_8port_device);
3235 usb_serial_deregister(&epic_device);
3236} 3209}
3237 3210
3238module_init(edgeport_init); 3211module_init(edgeport_init);