aboutsummaryrefslogtreecommitdiffstats
path: root/ipaq.patch
diff options
Diffstat (limited to 'ipaq.patch')
-rw-r--r--ipaq.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/ipaq.patch b/ipaq.patch
new file mode 100644
index 00000000000000..c708b4f3175be6
--- /dev/null
+++ b/ipaq.patch
@@ -0,0 +1,83 @@
+From foo@baz Thu Apr 19 15:13:59 PDT 2012
+Date: Thu, 19 Apr 2012 15:13:59 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: USB: serial: ipaq: 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>
+
+---
+ drivers/usb/serial/ipaq.c | 33 +--------------------------------
+ 1 file changed, 1 insertion(+), 32 deletions(-)
+
+--- a/drivers/usb/serial/ipaq.c
++++ b/drivers/usb/serial/ipaq.c
+@@ -33,7 +33,6 @@
+ #define DRIVER_AUTHOR "Ganesh Varadarajan <ganesh@veritas.com>"
+ #define DRIVER_DESC "USB PocketPC PDA driver"
+
+-static __u16 product, vendor;
+ static bool debug;
+ static int connect_retries = KP_RETRIES;
+ static int initial_wait;
+@@ -45,7 +44,6 @@ static int ipaq_calc_num_ports(struct u
+ static int ipaq_startup(struct usb_serial *serial);
+
+ static struct usb_device_id ipaq_id_table [] = {
+- /* The first entry is a placeholder for the insmod-specified device */
+ { USB_DEVICE(0x049F, 0x0003) },
+ { USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */
+ { USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */
+@@ -623,30 +621,7 @@ static int ipaq_startup(struct usb_seria
+ return usb_reset_configuration(serial->dev);
+ }
+
+-static int __init ipaq_init(void)
+-{
+- int retval;
+-
+- if (vendor) {
+- ipaq_id_table[0].idVendor = vendor;
+- ipaq_id_table[0].idProduct = product;
+- }
+-
+- retval = usb_serial_register_drivers(&ipaq_driver, serial_drivers);
+- if (retval == 0)
+- printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+- DRIVER_DESC "\n");
+- return retval;
+-}
+-
+-static void __exit ipaq_exit(void)
+-{
+- usb_serial_deregister_drivers(&ipaq_driver, serial_drivers);
+-}
+-
+-
+-module_init(ipaq_init);
+-module_exit(ipaq_exit);
++module_usb_serial_driver(ipaq_driver, serial_drivers);
+
+ MODULE_AUTHOR(DRIVER_AUTHOR);
+ MODULE_DESCRIPTION(DRIVER_DESC);
+@@ -655,12 +630,6 @@ MODULE_LICENSE("GPL");
+ module_param(debug, bool, S_IRUGO | S_IWUSR);
+ MODULE_PARM_DESC(debug, "Debug enabled or not");
+
+-module_param(vendor, ushort, 0);
+-MODULE_PARM_DESC(vendor, "User specified USB idVendor");
+-
+-module_param(product, ushort, 0);
+-MODULE_PARM_DESC(product, "User specified USB idProduct");
+-
+ module_param(connect_retries, int, S_IRUGO|S_IWUSR);
+ MODULE_PARM_DESC(connect_retries,
+ "Maximum number of connect retries (one second each)");