aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/qcaux.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/qcaux.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/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 = {
82 .probe = usb_serial_probe, 82 .probe = usb_serial_probe,
83 .disconnect = usb_serial_disconnect, 83 .disconnect = usb_serial_disconnect,
84 .id_table = id_table, 84 .id_table = id_table,
85 .no_dynamic_id = 1,
86}; 85};
87 86
88static struct usb_serial_driver qcaux_device = { 87static struct usb_serial_driver qcaux_device = {
@@ -91,27 +90,21 @@ static struct usb_serial_driver qcaux_device = {
91 .name = "qcaux", 90 .name = "qcaux",
92 }, 91 },
93 .id_table = id_table, 92 .id_table = id_table,
94 .usb_driver = &qcaux_driver,
95 .num_ports = 1, 93 .num_ports = 1,
96}; 94};
97 95
96static struct usb_serial_driver * const serial_drivers[] = {
97 &qcaux_device, NULL
98};
99
98static int __init qcaux_init(void) 100static int __init qcaux_init(void)
99{ 101{
100 int retval; 102 return usb_serial_register_drivers(&qcaux_driver, serial_drivers);
101
102 retval = usb_serial_register(&qcaux_device);
103 if (retval)
104 return retval;
105 retval = usb_register(&qcaux_driver);
106 if (retval)
107 usb_serial_deregister(&qcaux_device);
108 return retval;
109} 103}
110 104
111static void __exit qcaux_exit(void) 105static void __exit qcaux_exit(void)
112{ 106{
113 usb_deregister(&qcaux_driver); 107 usb_serial_deregister_drivers(&qcaux_driver, serial_drivers);
114 usb_serial_deregister(&qcaux_device);
115} 108}
116 109
117module_init(qcaux_init); 110module_init(qcaux_init);