summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/omninet.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 12:39:20 -0800
commitf667ddad41e303ebc2c6d5bf3105dffe2fbdd717 (patch)
tree4f1391375183b38ef74bafed9a71f7f140c6c510 /drivers/usb/serial/omninet.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/omninet.c')
-rw-r--r--drivers/usb/serial/omninet.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 033e8afa6c7..975d5c559cc 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -62,7 +62,6 @@ static struct usb_driver omninet_driver = {
.probe = usb_serial_probe,
.disconnect = usb_serial_disconnect,
.id_table = id_table,
- .no_dynamic_id = 1,
};
@@ -72,7 +71,6 @@ static struct usb_serial_driver zyxel_omninet_device = {
.name = "omninet",
},
.description = "ZyXEL - omni.net lcd plus usb",
- .usb_driver = &omninet_driver,
.id_table = id_table,
.num_ports = 1,
.attach = omninet_attach,
@@ -86,6 +84,10 @@ static struct usb_serial_driver zyxel_omninet_device = {
.release = omninet_release,
};
+static struct usb_serial_driver * const serial_drivers[] = {
+ &zyxel_omninet_device, NULL
+};
+
/* The protocol.
*
@@ -323,26 +325,18 @@ static void omninet_release(struct usb_serial *serial)
static int __init omninet_init(void)
{
int retval;
- retval = usb_serial_register(&zyxel_omninet_device);
- if (retval)
- goto failed_usb_serial_register;
- retval = usb_register(&omninet_driver);
- if (retval)
- goto failed_usb_register;
- printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
- DRIVER_DESC "\n");
- return 0;
-failed_usb_register:
- usb_serial_deregister(&zyxel_omninet_device);
-failed_usb_serial_register:
+
+ retval = usb_serial_register_drivers(&omninet_driver, serial_drivers);
+ if (retval == 0)
+ printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+ DRIVER_DESC "\n");
return retval;
}
static void __exit omninet_exit(void)
{
- usb_deregister(&omninet_driver);
- usb_serial_deregister(&zyxel_omninet_device);
+ usb_serial_deregister_drivers(&omninet_driver, serial_drivers);
}