diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-02-23 23:57:25 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-25 00:39:20 +0400 |
commit | d860322f34e4a53f347b1aeae23d5b72f1e91b8c (patch) | |
tree | bea8d4ab22b81eed98ab67c82a994b73cb6c5763 /drivers/usb/serial/sierra.c | |
parent | f667ddad41e303ebc2c6d5bf3105dffe2fbdd717 (diff) | |
download | linux-d860322f34e4a53f347b1aeae23d5b72f1e91b8c.tar.xz |
usb-serial: use new registration API in [q-s]* drivers
This patch (as1528) modifies the following usb-serial drivers to
utilize the new usb_serial_{de}register_drivers() routines:
qcaux, qcserial, safe_serial, siemens_mpi, sierra,
spcp8x5, ssu100, and symbolserial.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/sierra.c')
-rw-r--r-- | drivers/usb/serial/sierra.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index fdae0a4407cb..d75a75b83e9f 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -1084,7 +1084,6 @@ static struct usb_driver sierra_driver = { .resume = usb_serial_resume, .reset_resume = sierra_reset_resume, .id_table = id_table, - .no_dynamic_id = 1, .supports_autosuspend = 1, }; @@ -1095,7 +1094,6 @@ static struct usb_serial_driver sierra_device = { }, .description = "Sierra USB modem", .id_table = id_table, - .usb_driver = &sierra_driver, .calc_num_ports = sierra_calc_num_ports, .probe = sierra_probe, .open = sierra_open, @@ -1113,34 +1111,25 @@ static struct usb_serial_driver sierra_device = { .read_int_callback = sierra_instat_callback, }; +static struct usb_serial_driver * const serial_drivers[] = { + &sierra_device, NULL +}; + /* Functions used by new usb-serial code. */ static int __init sierra_init(void) { int retval; - retval = usb_serial_register(&sierra_device); - if (retval) - goto failed_device_register; - - - retval = usb_register(&sierra_driver); - if (retval) - goto failed_driver_register; - - printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" - DRIVER_DESC "\n"); - - return 0; -failed_driver_register: - usb_serial_deregister(&sierra_device); -failed_device_register: + retval = usb_serial_register_drivers(&sierra_driver, serial_drivers); + if (retval == 0) + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" + DRIVER_DESC "\n"); return retval; } static void __exit sierra_exit(void) { - usb_deregister(&sierra_driver); - usb_serial_deregister(&sierra_device); + usb_serial_deregister_drivers(&sierra_driver, serial_drivers); } module_init(sierra_init); |