diff options
Diffstat (limited to 'drivers/usb/serial/sierra.c')
-rw-r--r-- | drivers/usb/serial/sierra.c | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index f2485429172f..f14465a83dd1 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -46,8 +46,8 @@ allocations > PAGE_SIZE and the number of packets in a page is an integer 512 is the largest possible packet on EHCI */ -static int debug; -static int nmea; +static bool debug; +static bool nmea; /* Used in interface blacklisting */ struct sierra_iface_info { @@ -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,38 +1111,11 @@ static struct usb_serial_driver sierra_device = { .read_int_callback = sierra_instat_callback, }; -/* 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: - return retval; -} - -static void __exit sierra_exit(void) -{ - usb_deregister(&sierra_driver); - usb_serial_deregister(&sierra_device); -} +static struct usb_serial_driver * const serial_drivers[] = { + &sierra_device, NULL +}; -module_init(sierra_init); -module_exit(sierra_exit); +module_usb_serial_driver(sierra_driver, serial_drivers); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); |