summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/qcaux.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-02-23 23:57:25 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-25 00:39:20 +0400
commitd860322f34e4a53f347b1aeae23d5b72f1e91b8c (patch)
treebea8d4ab22b81eed98ab67c82a994b73cb6c5763 /drivers/usb/serial/qcaux.c
parentf667ddad41e303ebc2c6d5bf3105dffe2fbdd717 (diff)
downloadlinux-d860322f34e4a53f347b1aeae23d5b72f1e91b8c.tar.xz
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/qcaux.c')
-rw-r--r--drivers/usb/serial/qcaux.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/usb/serial/qcaux.c b/drivers/usb/serial/qcaux.c
index a34819884c1a..a2ce274b3f28 100644
--- a/drivers/usb/serial/qcaux.c
+++ b/drivers/usb/serial/qcaux.c
@@ -82,7 +82,6 @@ static struct usb_driver qcaux_driver = {
.probe = usb_serial_probe,
.disconnect = usb_serial_disconnect,
.id_table = id_table,
- .no_dynamic_id = 1,
};
static struct usb_serial_driver qcaux_device = {
@@ -91,27 +90,21 @@ static struct usb_serial_driver qcaux_device = {
.name = "qcaux",
},
.id_table = id_table,
- .usb_driver = &qcaux_driver,
.num_ports = 1,
};
+static struct usb_serial_driver * const serial_drivers[] = {
+ &qcaux_device, NULL
+};
+
static int __init qcaux_init(void)
{
- int retval;
-
- retval = usb_serial_register(&qcaux_device);
- if (retval)
- return retval;
- retval = usb_register(&qcaux_driver);
- if (retval)
- usb_serial_deregister(&qcaux_device);
- return retval;
+ return usb_serial_register_drivers(&qcaux_driver, serial_drivers);
}
static void __exit qcaux_exit(void)
{
- usb_deregister(&qcaux_driver);
- usb_serial_deregister(&qcaux_device);
+ usb_serial_deregister_drivers(&qcaux_driver, serial_drivers);
}
module_init(qcaux_init);