aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/visor.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-19 18:15:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-19 18:16:59 -0400
commit0bf4da35b5236b585f8e4531c604accd36ed9bc2 (patch)
treef763e30ce1a5382f15cc291e45e1ef45a4e5d435 /drivers/usb/serial/visor.c
parent15c9d50bbb4f754c02493fa880658d6bd5b5c27d (diff)
USB: serial: visor: remove product and vendor module parameters
This driver is for devices that are no longer being made, so the ability to add new device ids when loading the module is not a feature that anyone uses anymore. So remove it, which simplifies the startup code a lot, and saves space. If you still need to dynamically load device ids, that can be done through sysfs. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/visor.c')
-rw-r--r--drivers/usb/serial/visor.c65
1 files changed, 1 insertions, 64 deletions
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index 71d696474f24..aa8911dc4154 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -53,8 +53,6 @@ static int palm_os_4_probe(struct usb_serial *serial,
53 53
54/* Parameters that may be passed into the module. */ 54/* Parameters that may be passed into the module. */
55static bool debug; 55static bool debug;
56static __u16 vendor;
57static __u16 product;
58 56
59static struct usb_device_id id_table [] = { 57static struct usb_device_id id_table [] = {
60 { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID), 58 { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID),
@@ -115,14 +113,12 @@ static struct usb_device_id id_table [] = {
115 .driver_info = (kernel_ulong_t)&palm_os_4_probe }, 113 .driver_info = (kernel_ulong_t)&palm_os_4_probe },
116 { USB_DEVICE(FOSSIL_VENDOR_ID, FOSSIL_ABACUS_ID), 114 { USB_DEVICE(FOSSIL_VENDOR_ID, FOSSIL_ABACUS_ID),
117 .driver_info = (kernel_ulong_t)&palm_os_4_probe }, 115 .driver_info = (kernel_ulong_t)&palm_os_4_probe },
118 { }, /* optional parameter entry */
119 { } /* Terminating entry */ 116 { } /* Terminating entry */
120}; 117};
121 118
122static struct usb_device_id clie_id_5_table [] = { 119static struct usb_device_id clie_id_5_table [] = {
123 { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_UX50_ID), 120 { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_UX50_ID),
124 .driver_info = (kernel_ulong_t)&palm_os_4_probe }, 121 .driver_info = (kernel_ulong_t)&palm_os_4_probe },
125 { }, /* optional parameter entry */
126 { } /* Terminating entry */ 122 { } /* Terminating entry */
127}; 123};
128 124
@@ -162,7 +158,6 @@ static struct usb_device_id id_table_combined [] = {
162 { USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID) }, 158 { USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID) },
163 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_7135_ID) }, 159 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_7135_ID) },
164 { USB_DEVICE(FOSSIL_VENDOR_ID, FOSSIL_ABACUS_ID) }, 160 { USB_DEVICE(FOSSIL_VENDOR_ID, FOSSIL_ABACUS_ID) },
165 { }, /* optional parameter entry */
166 { } /* Terminating entry */ 161 { } /* Terminating entry */
167}; 162};
168 163
@@ -648,59 +643,7 @@ static int clie_5_attach(struct usb_serial *serial)
648 return 0; 643 return 0;
649} 644}
650 645
651static int __init visor_init(void) 646module_usb_serial_driver(visor_driver, serial_drivers);
652{
653 int i, retval;
654 /* Only if parameters were passed to us */
655 if (vendor > 0 && product > 0) {
656 struct usb_device_id usb_dev_temp[] = {
657 {
658 USB_DEVICE(vendor, product),
659 .driver_info =
660 (kernel_ulong_t) &palm_os_4_probe
661 }
662 };
663
664 /* Find the last entry in id_table */
665 for (i = 0;; i++) {
666 if (id_table[i].idVendor == 0) {
667 id_table[i] = usb_dev_temp[0];
668 break;
669 }
670 }
671 /* Find the last entry in id_table_combined */
672 for (i = 0;; i++) {
673 if (id_table_combined[i].idVendor == 0) {
674 id_table_combined[i] = usb_dev_temp[0];
675 break;
676 }
677 }
678 printk(KERN_INFO KBUILD_MODNAME
679 ": Untested USB device specified at time of module insertion\n");
680 printk(KERN_INFO KBUILD_MODNAME
681 ": Warning: This is not guaranteed to work\n");
682 printk(KERN_INFO KBUILD_MODNAME
683 ": Using a newer kernel is preferred to this method\n");
684 printk(KERN_INFO KBUILD_MODNAME
685 ": Adding Palm OS protocol 4.x support for unknown device: 0x%x/0x%x\n",
686 vendor, product);
687 }
688
689 retval = usb_serial_register_drivers(&visor_driver, serial_drivers);
690 if (retval == 0)
691 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n");
692 return retval;
693}
694
695
696static void __exit visor_exit (void)
697{
698 usb_serial_deregister_drivers(&visor_driver, serial_drivers);
699}
700
701
702module_init(visor_init);
703module_exit(visor_exit);
704 647
705MODULE_AUTHOR(DRIVER_AUTHOR); 648MODULE_AUTHOR(DRIVER_AUTHOR);
706MODULE_DESCRIPTION(DRIVER_DESC); 649MODULE_DESCRIPTION(DRIVER_DESC);
@@ -708,9 +651,3 @@ MODULE_LICENSE("GPL");
708 651
709module_param(debug, bool, S_IRUGO | S_IWUSR); 652module_param(debug, bool, S_IRUGO | S_IWUSR);
710MODULE_PARM_DESC(debug, "Debug enabled or not"); 653MODULE_PARM_DESC(debug, "Debug enabled or not");
711
712module_param(vendor, ushort, 0);
713MODULE_PARM_DESC(vendor, "User specified vendor ID");
714module_param(product, ushort, 0);
715MODULE_PARM_DESC(product, "User specified product ID");
716