summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/qcserial.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-02-23 20:57:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-24 21:39:20 +0100
commitd860322f34e4a53f347b1aeae23d5b72f1e91b8c (patch)
treebea8d4ab22b81eed98ab67c82a994b73cb6c5763 /drivers/usb/serial/qcserial.c
parentusb-serial: use new registration API in [n-p]* drivers (diff)
downloadlinux-d860322f34e4a53f347b1aeae23d5b72f1e91b8c.tar.xz
linux-d860322f34e4a53f347b1aeae23d5b72f1e91b8c.zip
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/qcserial.c')
-rw-r--r--drivers/usb/serial/qcserial.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
index f98800f2324c..70e9f1abdad1 100644
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -246,7 +246,6 @@ static struct usb_serial_driver qcdevice = {
},
.description = "Qualcomm USB modem",
.id_table = id_table,
- .usb_driver = &qcdriver,
.num_ports = 1,
.probe = qcprobe,
.open = usb_wwan_open,
@@ -263,27 +262,18 @@ static struct usb_serial_driver qcdevice = {
#endif
};
+static struct usb_serial_driver * const serial_drivers[] = {
+ &qcdevice, NULL
+};
+
static int __init qcinit(void)
{
- int retval;
-
- retval = usb_serial_register(&qcdevice);
- if (retval)
- return retval;
-
- retval = usb_register(&qcdriver);
- if (retval) {
- usb_serial_deregister(&qcdevice);
- return retval;
- }
-
- return 0;
+ return usb_serial_register_drivers(&qcdriver, serial_drivers);
}
static void __exit qcexit(void)
{
- usb_deregister(&qcdriver);
- usb_serial_deregister(&qcdevice);
+ usb_serial_deregister_drivers(&qcdriver, serial_drivers);
}
module_init(qcinit);