summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/kl5kusb105.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-02-23 14:57:09 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-24 12:39:19 -0800
commit4d2a7aff1062048ea59214b49ca1d915586d6d6d (patch)
tree42e5426b6bb4abeee669d2dd709fb1285836b043 /drivers/usb/serial/kl5kusb105.c
parent7dbe2460989b10644651e779b17b683627feea48 (diff)
downloadlinux-4d2a7aff1062048ea59214b49ca1d915586d6d6d.tar.bz2
usb-serial: use new registration API in [k-m]* drivers
This patch (as1526) modifies the following usb-serial drivers to utilize the new usb_serial_{de}register_drivers() routines: keyspan, kl5kusb105, kobil_sct, mct_u232, mos7720, mos7840, and moto_modem. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/kl5kusb105.c')
-rw-r--r--drivers/usb/serial/kl5kusb105.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
index fc064e1442ca..0e65e50edd50 100644
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
@@ -91,7 +91,6 @@ static struct usb_driver kl5kusb105d_driver = {
.probe = usb_serial_probe,
.disconnect = usb_serial_disconnect,
.id_table = id_table,
- .no_dynamic_id = 1,
};
static struct usb_serial_driver kl5kusb105d_device = {
@@ -100,7 +99,6 @@ static struct usb_serial_driver kl5kusb105d_device = {
.name = "kl5kusb105d",
},
.description = "KL5KUSB105D / PalmConnect",
- .usb_driver = &kl5kusb105d_driver,
.id_table = id_table,
.num_ports = 1,
.bulk_out_size = 64,
@@ -118,6 +116,10 @@ static struct usb_serial_driver kl5kusb105d_device = {
.prepare_write_buffer = klsi_105_prepare_write_buffer,
};
+static struct usb_serial_driver * const serial_drivers[] = {
+ &kl5kusb105d_device, NULL
+};
+
struct klsi_105_port_settings {
__u8 pktlen; /* always 5, it seems */
__u8 baudrate;
@@ -694,26 +696,18 @@ static int klsi_105_tiocmset(struct tty_struct *tty,
static int __init klsi_105_init(void)
{
int retval;
- retval = usb_serial_register(&kl5kusb105d_device);
- if (retval)
- goto failed_usb_serial_register;
- retval = usb_register(&kl5kusb105d_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(&kl5kusb105d_device);
-failed_usb_serial_register:
+
+ retval = usb_serial_register_drivers(&kl5kusb105d_driver,
+ serial_drivers);
+ if (retval == 0)
+ printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+ DRIVER_DESC "\n");
return retval;
}
static void __exit klsi_105_exit(void)
{
- usb_deregister(&kl5kusb105d_driver);
- usb_serial_deregister(&kl5kusb105d_device);
+ usb_serial_deregister_drivers(&kl5kusb105d_driver, serial_drivers);
}