aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/qcserial.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-02-23 14:57:25 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-24 15:39:20 -0500
commitd860322f34e4a53f347b1aeae23d5b72f1e91b8c (patch)
treebea8d4ab22b81eed98ab67c82a994b73cb6c5763 /drivers/usb/serial/qcserial.c
parentf667ddad41e303ebc2c6d5bf3105dffe2fbdd717 (diff)
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 = {
246 }, 246 },
247 .description = "Qualcomm USB modem", 247 .description = "Qualcomm USB modem",
248 .id_table = id_table, 248 .id_table = id_table,
249 .usb_driver = &qcdriver,
250 .num_ports = 1, 249 .num_ports = 1,
251 .probe = qcprobe, 250 .probe = qcprobe,
252 .open = usb_wwan_open, 251 .open = usb_wwan_open,
@@ -263,27 +262,18 @@ static struct usb_serial_driver qcdevice = {
263#endif 262#endif
264}; 263};
265 264
265static struct usb_serial_driver * const serial_drivers[] = {
266 &qcdevice, NULL
267};
268
266static int __init qcinit(void) 269static int __init qcinit(void)
267{ 270{
268 int retval; 271 return usb_serial_register_drivers(&qcdriver, serial_drivers);
269
270 retval = usb_serial_register(&qcdevice);
271 if (retval)
272 return retval;
273
274 retval = usb_register(&qcdriver);
275 if (retval) {
276 usb_serial_deregister(&qcdevice);
277 return retval;
278 }
279
280 return 0;
281} 272}
282 273
283static void __exit qcexit(void) 274static void __exit qcexit(void)
284{ 275{
285 usb_deregister(&qcdriver); 276 usb_serial_deregister_drivers(&qcdriver, serial_drivers);
286 usb_serial_deregister(&qcdevice);
287} 277}
288 278
289module_init(qcinit); 279module_init(qcinit);