diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-02-23 23:56:57 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-25 00:39:18 +0400 |
commit | 7dbe2460989b10644651e779b17b683627feea48 (patch) | |
tree | 51ab97a04dfdcea7e71cbc5e8953efab69714b90 /drivers/usb/serial/ipw.c | |
parent | 97b6b6d2339f67eb17d954930a908b762af66228 (diff) | |
download | linux-7dbe2460989b10644651e779b17b683627feea48.tar.xz |
usb-serial: use new registration API in [i-j]* drivers
This patch (as1525) modifies the following usb-serial drivers to
utilize the new usb_serial_{de}register_drivers() routines:
io_edgeport, io_ti, ipaq, ipw, ir-usb, and iuu_phoenix.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/ipw.c')
-rw-r--r-- | drivers/usb/serial/ipw.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c index 6f9356f3f99e..27b8886f1055 100644 --- a/drivers/usb/serial/ipw.c +++ b/drivers/usb/serial/ipw.c @@ -144,7 +144,6 @@ static struct usb_driver usb_ipw_driver = { .probe = usb_serial_probe, .disconnect = usb_serial_disconnect, .id_table = usb_ipw_ids, - .no_dynamic_id = 1, }; static bool debug; @@ -318,7 +317,6 @@ static struct usb_serial_driver ipw_device = { .name = "ipw", }, .description = "IPWireless converter", - .usb_driver = &usb_ipw_driver, .id_table = usb_ipw_ids, .num_ports = 1, .disconnect = usb_wwan_disconnect, @@ -331,29 +329,25 @@ static struct usb_serial_driver ipw_device = { .write = usb_wwan_write, }; +static struct usb_serial_driver * const serial_drivers[] = { + &ipw_device, NULL +}; static int __init usb_ipw_init(void) { int retval; - retval = usb_serial_register(&ipw_device); - if (retval) - return retval; - retval = usb_register(&usb_ipw_driver); - if (retval) { - usb_serial_deregister(&ipw_device); - return retval; - } - printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" - DRIVER_DESC "\n"); - return 0; + retval = usb_serial_register_drivers(&usb_ipw_driver, serial_drivers); + if (retval == 0) + printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" + DRIVER_DESC "\n"); + return retval; } static void __exit usb_ipw_exit(void) { - usb_deregister(&usb_ipw_driver); - usb_serial_deregister(&ipw_device); + usb_serial_deregister_drivers(&usb_ipw_driver, serial_drivers); } module_init(usb_ipw_init); |