diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-02-23 14:57:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-24 15:39:20 -0500 |
commit | d860322f34e4a53f347b1aeae23d5b72f1e91b8c (patch) | |
tree | bea8d4ab22b81eed98ab67c82a994b73cb6c5763 /drivers/usb/serial/symbolserial.c | |
parent | f667ddad41e303ebc2c6d5bf3105dffe2fbdd717 (diff) |
usb-serial: use new registration API in [q-s]* drivers
This patch (as1528) modifies the following usb-serial drivers to
utilize the new usb_serial_{de}register_drivers() routines:
qcaux, qcserial, safe_serial, siemens_mpi, sierra,
spcp8x5, ssu100, and symbolserial.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/symbolserial.c')
-rw-r--r-- | drivers/usb/serial/symbolserial.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c index 50651cf4fc61..76cd9f2a08c0 100644 --- a/drivers/usb/serial/symbolserial.c +++ b/drivers/usb/serial/symbolserial.c | |||
@@ -287,7 +287,6 @@ static struct usb_driver symbol_driver = { | |||
287 | .probe = usb_serial_probe, | 287 | .probe = usb_serial_probe, |
288 | .disconnect = usb_serial_disconnect, | 288 | .disconnect = usb_serial_disconnect, |
289 | .id_table = id_table, | 289 | .id_table = id_table, |
290 | .no_dynamic_id = 1, | ||
291 | }; | 290 | }; |
292 | 291 | ||
293 | static struct usb_serial_driver symbol_device = { | 292 | static struct usb_serial_driver symbol_device = { |
@@ -296,7 +295,6 @@ static struct usb_serial_driver symbol_device = { | |||
296 | .name = "symbol", | 295 | .name = "symbol", |
297 | }, | 296 | }, |
298 | .id_table = id_table, | 297 | .id_table = id_table, |
299 | .usb_driver = &symbol_driver, | ||
300 | .num_ports = 1, | 298 | .num_ports = 1, |
301 | .attach = symbol_startup, | 299 | .attach = symbol_startup, |
302 | .open = symbol_open, | 300 | .open = symbol_open, |
@@ -307,23 +305,18 @@ static struct usb_serial_driver symbol_device = { | |||
307 | .unthrottle = symbol_unthrottle, | 305 | .unthrottle = symbol_unthrottle, |
308 | }; | 306 | }; |
309 | 307 | ||
308 | static struct usb_serial_driver * const serial_drivers[] = { | ||
309 | &symbol_device, NULL | ||
310 | }; | ||
311 | |||
310 | static int __init symbol_init(void) | 312 | static int __init symbol_init(void) |
311 | { | 313 | { |
312 | int retval; | 314 | return usb_serial_register_drivers(&symbol_driver, serial_drivers); |
313 | |||
314 | retval = usb_serial_register(&symbol_device); | ||
315 | if (retval) | ||
316 | return retval; | ||
317 | retval = usb_register(&symbol_driver); | ||
318 | if (retval) | ||
319 | usb_serial_deregister(&symbol_device); | ||
320 | return retval; | ||
321 | } | 315 | } |
322 | 316 | ||
323 | static void __exit symbol_exit(void) | 317 | static void __exit symbol_exit(void) |
324 | { | 318 | { |
325 | usb_deregister(&symbol_driver); | 319 | usb_serial_deregister_drivers(&symbol_driver, serial_drivers); |
326 | usb_serial_deregister(&symbol_device); | ||
327 | } | 320 | } |
328 | 321 | ||
329 | module_init(symbol_init); | 322 | module_init(symbol_init); |