diff options
Diffstat (limited to 'drivers/usb/serial/ipaq.c')
-rw-r--r-- | drivers/usb/serial/ipaq.c | 52 |
1 files changed, 5 insertions, 47 deletions
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 10c02b8b5664..c85a7eb87d4e 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #define DRIVER_AUTHOR "Ganesh Varadarajan <ganesh@veritas.com>" | 33 | #define DRIVER_AUTHOR "Ganesh Varadarajan <ganesh@veritas.com>" |
34 | #define DRIVER_DESC "USB PocketPC PDA driver" | 34 | #define DRIVER_DESC "USB PocketPC PDA driver" |
35 | 35 | ||
36 | static __u16 product, vendor; | ||
37 | static bool debug; | 36 | static bool debug; |
38 | static int connect_retries = KP_RETRIES; | 37 | static int connect_retries = KP_RETRIES; |
39 | static int initial_wait; | 38 | static int initial_wait; |
@@ -45,8 +44,6 @@ static int ipaq_calc_num_ports(struct usb_serial *serial); | |||
45 | static int ipaq_startup(struct usb_serial *serial); | 44 | static int ipaq_startup(struct usb_serial *serial); |
46 | 45 | ||
47 | static struct usb_device_id ipaq_id_table [] = { | 46 | static struct usb_device_id ipaq_id_table [] = { |
48 | /* The first entry is a placeholder for the insmod-specified device */ | ||
49 | { USB_DEVICE(0x049F, 0x0003) }, | ||
50 | { USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */ | 47 | { USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */ |
51 | { USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */ | 48 | { USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */ |
52 | { USB_DEVICE(0x03F0, 0x1116) }, /* HP USB Sync 1611 */ | 49 | { USB_DEVICE(0x03F0, 0x1116) }, /* HP USB Sync 1611 */ |
@@ -505,13 +502,6 @@ static struct usb_device_id ipaq_id_table [] = { | |||
505 | 502 | ||
506 | MODULE_DEVICE_TABLE(usb, ipaq_id_table); | 503 | MODULE_DEVICE_TABLE(usb, ipaq_id_table); |
507 | 504 | ||
508 | static struct usb_driver ipaq_driver = { | ||
509 | .name = "ipaq", | ||
510 | .probe = usb_serial_probe, | ||
511 | .disconnect = usb_serial_disconnect, | ||
512 | .id_table = ipaq_id_table, | ||
513 | }; | ||
514 | |||
515 | 505 | ||
516 | /* All of the device info needed for the Compaq iPAQ */ | 506 | /* All of the device info needed for the Compaq iPAQ */ |
517 | static struct usb_serial_driver ipaq_device = { | 507 | static struct usb_serial_driver ipaq_device = { |
@@ -539,8 +529,6 @@ static int ipaq_open(struct tty_struct *tty, | |||
539 | int result = 0; | 529 | int result = 0; |
540 | int retries = connect_retries; | 530 | int retries = connect_retries; |
541 | 531 | ||
542 | dbg("%s - port %d", __func__, port->number); | ||
543 | |||
544 | msleep(1000*initial_wait); | 532 | msleep(1000*initial_wait); |
545 | 533 | ||
546 | /* | 534 | /* |
@@ -577,7 +565,7 @@ static int ipaq_calc_num_ports(struct usb_serial *serial) | |||
577 | */ | 565 | */ |
578 | int ipaq_num_ports = 1; | 566 | int ipaq_num_ports = 1; |
579 | 567 | ||
580 | dbg("%s - numberofendpoints: %d", __FUNCTION__, | 568 | dev_dbg(&serial->dev->dev, "%s - numberofendpoints: %d\n", __func__, |
581 | (int)serial->interface->cur_altsetting->desc.bNumEndpoints); | 569 | (int)serial->interface->cur_altsetting->desc.bNumEndpoints); |
582 | 570 | ||
583 | /* | 571 | /* |
@@ -596,8 +584,6 @@ static int ipaq_calc_num_ports(struct usb_serial *serial) | |||
596 | 584 | ||
597 | static int ipaq_startup(struct usb_serial *serial) | 585 | static int ipaq_startup(struct usb_serial *serial) |
598 | { | 586 | { |
599 | dbg("%s", __func__); | ||
600 | |||
601 | /* Some of the devices in ipaq_id_table[] are composite, and we | 587 | /* Some of the devices in ipaq_id_table[] are composite, and we |
602 | * shouldn't bind to all the interfaces. This test will rule out | 588 | * shouldn't bind to all the interfaces. This test will rule out |
603 | * some obviously invalid possibilities. | 589 | * some obviously invalid possibilities. |
@@ -617,36 +603,14 @@ static int ipaq_startup(struct usb_serial *serial) | |||
617 | return -ENODEV; | 603 | return -ENODEV; |
618 | } | 604 | } |
619 | 605 | ||
620 | dbg("%s - iPAQ module configured for %d ports", | 606 | dev_dbg(&serial->dev->dev, |
621 | __FUNCTION__, serial->num_ports); | 607 | "%s - iPAQ module configured for %d ports\n", __func__, |
608 | serial->num_ports); | ||
622 | 609 | ||
623 | return usb_reset_configuration(serial->dev); | 610 | return usb_reset_configuration(serial->dev); |
624 | } | 611 | } |
625 | 612 | ||
626 | static int __init ipaq_init(void) | 613 | module_usb_serial_driver(serial_drivers, ipaq_id_table); |
627 | { | ||
628 | int retval; | ||
629 | |||
630 | if (vendor) { | ||
631 | ipaq_id_table[0].idVendor = vendor; | ||
632 | ipaq_id_table[0].idProduct = product; | ||
633 | } | ||
634 | |||
635 | retval = usb_serial_register_drivers(&ipaq_driver, serial_drivers); | ||
636 | if (retval == 0) | ||
637 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | ||
638 | DRIVER_DESC "\n"); | ||
639 | return retval; | ||
640 | } | ||
641 | |||
642 | static void __exit ipaq_exit(void) | ||
643 | { | ||
644 | usb_serial_deregister_drivers(&ipaq_driver, serial_drivers); | ||
645 | } | ||
646 | |||
647 | |||
648 | module_init(ipaq_init); | ||
649 | module_exit(ipaq_exit); | ||
650 | 614 | ||
651 | MODULE_AUTHOR(DRIVER_AUTHOR); | 615 | MODULE_AUTHOR(DRIVER_AUTHOR); |
652 | MODULE_DESCRIPTION(DRIVER_DESC); | 616 | MODULE_DESCRIPTION(DRIVER_DESC); |
@@ -655,12 +619,6 @@ MODULE_LICENSE("GPL"); | |||
655 | module_param(debug, bool, S_IRUGO | S_IWUSR); | 619 | module_param(debug, bool, S_IRUGO | S_IWUSR); |
656 | MODULE_PARM_DESC(debug, "Debug enabled or not"); | 620 | MODULE_PARM_DESC(debug, "Debug enabled or not"); |
657 | 621 | ||
658 | module_param(vendor, ushort, 0); | ||
659 | MODULE_PARM_DESC(vendor, "User specified USB idVendor"); | ||
660 | |||
661 | module_param(product, ushort, 0); | ||
662 | MODULE_PARM_DESC(product, "User specified USB idProduct"); | ||
663 | |||
664 | module_param(connect_retries, int, S_IRUGO|S_IWUSR); | 622 | module_param(connect_retries, int, S_IRUGO|S_IWUSR); |
665 | MODULE_PARM_DESC(connect_retries, | 623 | MODULE_PARM_DESC(connect_retries, |
666 | "Maximum number of connect retries (one second each)"); | 624 | "Maximum number of connect retries (one second each)"); |