diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-02-23 23:57:09 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-25 00:39:19 +0400 |
commit | 4d2a7aff1062048ea59214b49ca1d915586d6d6d (patch) | |
tree | 42e5426b6bb4abeee669d2dd709fb1285836b043 /drivers/usb/serial/kobil_sct.c | |
parent | 7dbe2460989b10644651e779b17b683627feea48 (diff) | |
download | linux-4d2a7aff1062048ea59214b49ca1d915586d6d6d.tar.xz |
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/kobil_sct.c')
-rw-r--r-- | drivers/usb/serial/kobil_sct.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index a92a3efb507b..a033dd7dc265 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c @@ -90,7 +90,6 @@ static struct usb_driver kobil_driver = { .probe = usb_serial_probe, .disconnect = usb_serial_disconnect, .id_table = id_table, - .no_dynamic_id = 1, }; @@ -100,7 +99,6 @@ static struct usb_serial_driver kobil_device = { .name = "kobil", }, .description = "KOBIL USB smart card terminal", - .usb_driver = &kobil_driver, .id_table = id_table, .num_ports = 1, .attach = kobil_startup, @@ -117,6 +115,9 @@ static struct usb_serial_driver kobil_device = { .read_int_callback = kobil_read_int_callback, }; +static struct usb_serial_driver * const serial_drivers[] = { + &kobil_device, NULL +}; struct kobil_private { int write_int_endpoint_address; @@ -685,28 +686,18 @@ static int kobil_ioctl(struct tty_struct *tty, static int __init kobil_init(void) { int retval; - retval = usb_serial_register(&kobil_device); - if (retval) - goto failed_usb_serial_register; - retval = usb_register(&kobil_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(&kobil_device); -failed_usb_serial_register: + retval = usb_serial_register_drivers(&kobil_driver, serial_drivers); + if (retval == 0) + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" + DRIVER_DESC "\n"); return retval; } static void __exit kobil_exit(void) { - usb_deregister(&kobil_driver); - usb_serial_deregister(&kobil_device); + usb_serial_deregister_drivers(&kobil_driver, serial_drivers); } module_init(kobil_init); |