ipw.c (4d68c05ce11f4cdf6a6392f3a18dc6a985b4d0c4) | ipw.c (7dbe2460989b10644651e779b17b683627feea48) |
---|---|
1/* 2 * IPWireless 3G UMTS TDD Modem driver (USB connected) 3 * 4 * Copyright (C) 2004 Roelf Diedericks <roelfd@inet.co.za> 5 * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 130 unchanged lines hidden (view full) --- 139 140MODULE_DEVICE_TABLE(usb, usb_ipw_ids); 141 142static struct usb_driver usb_ipw_driver = { 143 .name = "ipwtty", 144 .probe = usb_serial_probe, 145 .disconnect = usb_serial_disconnect, 146 .id_table = usb_ipw_ids, | 1/* 2 * IPWireless 3G UMTS TDD Modem driver (USB connected) 3 * 4 * Copyright (C) 2004 Roelf Diedericks <roelfd@inet.co.za> 5 * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 130 unchanged lines hidden (view full) --- 139 140MODULE_DEVICE_TABLE(usb, usb_ipw_ids); 141 142static struct usb_driver usb_ipw_driver = { 143 .name = "ipwtty", 144 .probe = usb_serial_probe, 145 .disconnect = usb_serial_disconnect, 146 .id_table = usb_ipw_ids, |
147 .no_dynamic_id = 1, | |
148}; 149 150static bool debug; 151 152static int ipw_open(struct tty_struct *tty, struct usb_serial_port *port) 153{ 154 struct usb_device *dev = port->serial->dev; 155 u8 buf_flow_static[16] = IPW_BYTES_FLOWINIT; --- 157 unchanged lines hidden (view full) --- 313} 314 315static struct usb_serial_driver ipw_device = { 316 .driver = { 317 .owner = THIS_MODULE, 318 .name = "ipw", 319 }, 320 .description = "IPWireless converter", | 147}; 148 149static bool debug; 150 151static int ipw_open(struct tty_struct *tty, struct usb_serial_port *port) 152{ 153 struct usb_device *dev = port->serial->dev; 154 u8 buf_flow_static[16] = IPW_BYTES_FLOWINIT; --- 157 unchanged lines hidden (view full) --- 312} 313 314static struct usb_serial_driver ipw_device = { 315 .driver = { 316 .owner = THIS_MODULE, 317 .name = "ipw", 318 }, 319 .description = "IPWireless converter", |
321 .usb_driver = &usb_ipw_driver, | |
322 .id_table = usb_ipw_ids, 323 .num_ports = 1, 324 .disconnect = usb_wwan_disconnect, 325 .open = ipw_open, 326 .close = ipw_close, 327 .probe = ipw_probe, 328 .attach = usb_wwan_startup, 329 .release = ipw_release, 330 .dtr_rts = ipw_dtr_rts, 331 .write = usb_wwan_write, 332}; 333 | 320 .id_table = usb_ipw_ids, 321 .num_ports = 1, 322 .disconnect = usb_wwan_disconnect, 323 .open = ipw_open, 324 .close = ipw_close, 325 .probe = ipw_probe, 326 .attach = usb_wwan_startup, 327 .release = ipw_release, 328 .dtr_rts = ipw_dtr_rts, 329 .write = usb_wwan_write, 330}; 331 |
332static struct usb_serial_driver * const serial_drivers[] = { 333 &ipw_device, NULL 334}; |
|
334 335 336static int __init usb_ipw_init(void) 337{ 338 int retval; 339 | 335 336 337static int __init usb_ipw_init(void) 338{ 339 int retval; 340 |
340 retval = usb_serial_register(&ipw_device); 341 if (retval) 342 return retval; 343 retval = usb_register(&usb_ipw_driver); 344 if (retval) { 345 usb_serial_deregister(&ipw_device); 346 return retval; 347 } 348 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" 349 DRIVER_DESC "\n"); 350 return 0; | 341 retval = usb_serial_register_drivers(&usb_ipw_driver, serial_drivers); 342 if (retval == 0) 343 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" 344 DRIVER_DESC "\n"); 345 return retval; |
351} 352 353static void __exit usb_ipw_exit(void) 354{ | 346} 347 348static void __exit usb_ipw_exit(void) 349{ |
355 usb_deregister(&usb_ipw_driver); 356 usb_serial_deregister(&ipw_device); | 350 usb_serial_deregister_drivers(&usb_ipw_driver, serial_drivers); |
357} 358 359module_init(usb_ipw_init); 360module_exit(usb_ipw_exit); 361 362/* Module information */ 363MODULE_AUTHOR(DRIVER_AUTHOR); 364MODULE_DESCRIPTION(DRIVER_DESC); 365MODULE_LICENSE("GPL"); 366 367module_param(debug, bool, S_IRUGO | S_IWUSR); 368MODULE_PARM_DESC(debug, "Debug enabled or not"); | 351} 352 353module_init(usb_ipw_init); 354module_exit(usb_ipw_exit); 355 356/* Module information */ 357MODULE_AUTHOR(DRIVER_AUTHOR); 358MODULE_DESCRIPTION(DRIVER_DESC); 359MODULE_LICENSE("GPL"); 360 361module_param(debug, bool, S_IRUGO | S_IWUSR); 362MODULE_PARM_DESC(debug, "Debug enabled or not"); |