diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-02-23 14:56:57 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-24 15:39:18 -0500 |
commit | 7dbe2460989b10644651e779b17b683627feea48 (patch) | |
tree | 51ab97a04dfdcea7e71cbc5e8953efab69714b90 /drivers/usb/serial/io_edgeport.c | |
parent | 97b6b6d2339f67eb17d954930a908b762af66228 (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.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) | |||
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 | |||
3212 | failed_usb_register: | ||
3213 | usb_serial_deregister(&epic_device); | ||
3214 | failed_epic_device_register: | ||
3215 | usb_serial_deregister(&edgeport_8port_device); | ||
3216 | failed_8port_device_register: | ||
3217 | usb_serial_deregister(&edgeport_4port_device); | ||
3218 | failed_4port_device_register: | ||
3219 | usb_serial_deregister(&edgeport_2port_device); | ||
3220 | failed_2port_device_register: | ||
3221 | return retval; | 3198 | return retval; |
3222 | } | 3199 | } |
3223 | 3200 | ||
@@ -3228,11 +3205,7 @@ failed_2port_device_register: | |||
3228 | ****************************************************************************/ | 3205 | ****************************************************************************/ |
3229 | static void __exit edgeport_exit (void) | 3206 | static 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 | ||
3238 | module_init(edgeport_init); | 3211 | module_init(edgeport_init); |