summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/usb_debug.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-02-23 14:57:32 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-24 12:39:21 -0800
commit29618e9fb5507b9fcf07f739a8506a3640495945 (patch)
treed5b05698811d39a6068bd8bfae99e04cb6da4e8f /drivers/usb/serial/usb_debug.c
parentd860322f34e4a53f347b1aeae23d5b72f1e91b8c (diff)
usb-serial: use new registration API in [t-z]* drivers
This patch (as1529) modifies the following usb-serial drivers to utilize the new usb_serial_{de}register_drivers() routines: ti_usb_3410_5052, usb_debug, visor, vivopay-serial, whiteheat, and zio. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/usb_debug.c')
-rw-r--r--drivers/usb/serial/usb_debug.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c
index 9b632e753210..5b29b4a2ebc7 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,30 +73,24 @@ 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 struct usb_serial_driver * const serial_drivers[] = {
+ &debug_device, NULL
+};
+
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;
+ return usb_serial_register_drivers(&debug_driver, serial_drivers);
}
static void __exit debug_exit(void)
{
- usb_deregister(&debug_driver);
- usb_serial_deregister(&debug_device);
+ usb_serial_deregister_drivers(&debug_driver, serial_drivers);
}
module_init(debug_init);