aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/navman.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-02-23 14:57:18 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-24 15:39:20 -0500
commitf667ddad41e303ebc2c6d5bf3105dffe2fbdd717 (patch)
tree4f1391375183b38ef74bafed9a71f7f140c6c510 /drivers/usb/serial/navman.c
parent4d2a7aff1062048ea59214b49ca1d915586d6d6d (diff)
usb-serial: use new registration API in [n-p]* drivers
This patch (as1527) modifies the following usb-serial drivers to utilize the new usb_serial_{de}register_drivers() routines: navman, omninet, opticon, option, oti6858, and pl2303. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/navman.c')
-rw-r--r--drivers/usb/serial/navman.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c
index b28f1db0195f..fd4b2c833c0b 100644
--- a/drivers/usb/serial/navman.c
+++ b/drivers/usb/serial/navman.c
@@ -35,7 +35,6 @@ static struct usb_driver navman_driver = {
35 .probe = usb_serial_probe, 35 .probe = usb_serial_probe,
36 .disconnect = usb_serial_disconnect, 36 .disconnect = usb_serial_disconnect,
37 .id_table = id_table, 37 .id_table = id_table,
38 .no_dynamic_id = 1,
39}; 38};
40 39
41static void navman_read_int_callback(struct urb *urb) 40static void navman_read_int_callback(struct urb *urb)
@@ -122,7 +121,6 @@ static struct usb_serial_driver navman_device = {
122 .name = "navman", 121 .name = "navman",
123 }, 122 },
124 .id_table = id_table, 123 .id_table = id_table,
125 .usb_driver = &navman_driver,
126 .num_ports = 1, 124 .num_ports = 1,
127 .open = navman_open, 125 .open = navman_open,
128 .close = navman_close, 126 .close = navman_close,
@@ -130,23 +128,18 @@ static struct usb_serial_driver navman_device = {
130 .read_int_callback = navman_read_int_callback, 128 .read_int_callback = navman_read_int_callback,
131}; 129};
132 130
131static struct usb_serial_driver * const serial_drivers[] = {
132 &navman_device, NULL
133};
134
133static int __init navman_init(void) 135static int __init navman_init(void)
134{ 136{
135 int retval; 137 return usb_serial_register_drivers(&navman_driver, serial_drivers);
136
137 retval = usb_serial_register(&navman_device);
138 if (retval)
139 return retval;
140 retval = usb_register(&navman_driver);
141 if (retval)
142 usb_serial_deregister(&navman_device);
143 return retval;
144} 138}
145 139
146static void __exit navman_exit(void) 140static void __exit navman_exit(void)
147{ 141{
148 usb_deregister(&navman_driver); 142 usb_serial_deregister_drivers(&navman_driver, serial_drivers);
149 usb_serial_deregister(&navman_device);
150} 143}
151 144
152module_init(navman_init); 145module_init(navman_init);