summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/navman.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-02-23 20:57:18 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-24 21:39:20 +0100
commitf667ddad41e303ebc2c6d5bf3105dffe2fbdd717 (patch)
tree4f1391375183b38ef74bafed9a71f7f140c6c510 /drivers/usb/serial/navman.c
parentusb-serial: use new registration API in [k-m]* drivers (diff)
downloadlinux-f667ddad41e303ebc2c6d5bf3105dffe2fbdd717.tar.xz
linux-f667ddad41e303ebc2c6d5bf3105dffe2fbdd717.zip
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 = {
.probe = usb_serial_probe,
.disconnect = usb_serial_disconnect,
.id_table = id_table,
- .no_dynamic_id = 1,
};
static void navman_read_int_callback(struct urb *urb)
@@ -122,7 +121,6 @@ static struct usb_serial_driver navman_device = {
.name = "navman",
},
.id_table = id_table,
- .usb_driver = &navman_driver,
.num_ports = 1,
.open = navman_open,
.close = navman_close,
@@ -130,23 +128,18 @@ static struct usb_serial_driver navman_device = {
.read_int_callback = navman_read_int_callback,
};
+static struct usb_serial_driver * const serial_drivers[] = {
+ &navman_device, NULL
+};
+
static int __init navman_init(void)
{
- int retval;
-
- retval = usb_serial_register(&navman_device);
- if (retval)
- return retval;
- retval = usb_register(&navman_driver);
- if (retval)
- usb_serial_deregister(&navman_device);
- return retval;
+ return usb_serial_register_drivers(&navman_driver, serial_drivers);
}
static void __exit navman_exit(void)
{
- usb_deregister(&navman_driver);
- usb_serial_deregister(&navman_device);
+ usb_serial_deregister_drivers(&navman_driver, serial_drivers);
}
module_init(navman_init);