aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/keyspan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/keyspan.c')
-rw-r--r--drivers/usb/serial/keyspan.c38
1 files changed, 5 insertions, 33 deletions
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index 4cc36c761801..0d5d3025a663 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -134,45 +134,17 @@ struct keyspan_port_private {
134static int __init keyspan_init(void) 134static int __init keyspan_init(void)
135{ 135{
136 int retval; 136 int retval;
137 retval = usb_serial_register(&keyspan_pre_device);
138 if (retval)
139 goto failed_pre_device_register;
140 retval = usb_serial_register(&keyspan_1port_device);
141 if (retval)
142 goto failed_1port_device_register;
143 retval = usb_serial_register(&keyspan_2port_device);
144 if (retval)
145 goto failed_2port_device_register;
146 retval = usb_serial_register(&keyspan_4port_device);
147 if (retval)
148 goto failed_4port_device_register;
149 retval = usb_register(&keyspan_driver);
150 if (retval)
151 goto failed_usb_register;
152
153 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
154 DRIVER_DESC "\n");
155 137
156 return 0; 138 retval = usb_serial_register_drivers(&keyspan_driver, serial_drivers);
157failed_usb_register: 139 if (retval == 0)
158 usb_serial_deregister(&keyspan_4port_device); 140 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
159failed_4port_device_register: 141 DRIVER_DESC "\n");
160 usb_serial_deregister(&keyspan_2port_device);
161failed_2port_device_register:
162 usb_serial_deregister(&keyspan_1port_device);
163failed_1port_device_register:
164 usb_serial_deregister(&keyspan_pre_device);
165failed_pre_device_register:
166 return retval; 142 return retval;
167} 143}
168 144
169static void __exit keyspan_exit(void) 145static void __exit keyspan_exit(void)
170{ 146{
171 usb_deregister(&keyspan_driver); 147 usb_serial_deregister_drivers(&keyspan_driver, serial_drivers);
172 usb_serial_deregister(&keyspan_pre_device);
173 usb_serial_deregister(&keyspan_1port_device);
174 usb_serial_deregister(&keyspan_2port_device);
175 usb_serial_deregister(&keyspan_4port_device);
176} 148}
177 149
178module_init(keyspan_init); 150module_init(keyspan_init);