diff options
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); |