summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/ark3116.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-02-23 14:56:17 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-24 12:39:17 -0800
commit08a4f6bc2e7046ce50849d7589b7d0763926d808 (patch)
tree9c2f247154db1872ef71e9c5ec8afbdd87e02b83 /drivers/usb/serial/ark3116.c
parent765e0ba62613fb90f09c1b5926750df0aa56f349 (diff)
usb-serial: use new registration API in [a-c]* drivers
This patch (as1523) modifies the following usb-serial drivers to utilize the new usb_serial_{de}register_drivers() routines: aircable, ark3116, belkin_sa, ch341, cp210x, cyberjack, and cypress_m8. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/ark3116.c')
-rw-r--r--drivers/usb/serial/ark3116.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index 69328dcfd91a..ab2cf1165c60 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -719,7 +719,6 @@ static struct usb_driver ark3116_driver = {
.probe = usb_serial_probe,
.disconnect = usb_serial_disconnect,
.id_table = id_table,
- .no_dynamic_id = 1,
};
static struct usb_serial_driver ark3116_device = {
@@ -728,7 +727,6 @@ static struct usb_serial_driver ark3116_device = {
.name = "ark3116",
},
.id_table = id_table,
- .usb_driver = &ark3116_driver,
.num_ports = 1,
.attach = ark3116_attach,
.release = ark3116_release,
@@ -745,28 +743,27 @@ static struct usb_serial_driver ark3116_device = {
.process_read_urb = ark3116_process_read_urb,
};
+static struct usb_serial_driver * const serial_drivers[] = {
+ &ark3116_device, NULL
+};
+
static int __init ark3116_init(void)
{
int retval;
- retval = usb_serial_register(&ark3116_device);
- if (retval)
- return retval;
- retval = usb_register(&ark3116_driver);
+ retval = usb_serial_register_drivers(&ark3116_driver, serial_drivers);
if (retval == 0) {
printk(KERN_INFO "%s:"
DRIVER_VERSION ":"
DRIVER_DESC "\n",
KBUILD_MODNAME);
- } else
- usb_serial_deregister(&ark3116_device);
+ }
return retval;
}
static void __exit ark3116_exit(void)
{
- usb_deregister(&ark3116_driver);
- usb_serial_deregister(&ark3116_device);
+ usb_serial_deregister_drivers(&ark3116_driver, serial_drivers);
}
module_init(ark3116_init);