diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-05-24 01:13:01 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-05-24 01:13:01 -0700 |
commit | e644dae645e167d154c0526358940986682a72b0 (patch) | |
tree | 972993c6568085b8d407fc7e13de10f4b93c651d /drivers/usb/serial/usb_debug.c | |
parent | 899c612d74d4a242158a4db20367388d6299c028 (diff) | |
parent | 86809173ce32ef03bd4d0389dfc72df0c805e9c4 (diff) |
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/usb/serial/usb_debug.c')
-rw-r--r-- | drivers/usb/serial/usb_debug.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index 9b632e75321..e3e8995a473 100644 --- a/drivers/usb/serial/usb_debug.c +++ b/drivers/usb/serial/usb_debug.c @@ -40,7 +40,6 @@ static struct usb_driver debug_driver = { .probe = usb_serial_probe, .disconnect = usb_serial_disconnect, .id_table = id_table, - .no_dynamic_id = 1, }; /* This HW really does not support a serial break, so one will be @@ -74,32 +73,15 @@ static struct usb_serial_driver debug_device = { .name = "debug", }, .id_table = id_table, - .usb_driver = &debug_driver, .num_ports = 1, .bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE, .break_ctl = usb_debug_break_ctl, .process_read_urb = usb_debug_process_read_urb, }; -static int __init debug_init(void) -{ - int retval; - - retval = usb_serial_register(&debug_device); - if (retval) - return retval; - retval = usb_register(&debug_driver); - if (retval) - usb_serial_deregister(&debug_device); - return retval; -} - -static void __exit debug_exit(void) -{ - usb_deregister(&debug_driver); - usb_serial_deregister(&debug_device); -} +static struct usb_serial_driver * const serial_drivers[] = { + &debug_device, NULL +}; -module_init(debug_init); -module_exit(debug_exit); +module_usb_serial_driver(debug_driver, serial_drivers); MODULE_LICENSE("GPL"); |