aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 16:37:32 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 16:37:32 -0500
commitfdac0f647a2cf12e7152dc1d94dd08a1af4a2a82 (patch)
treee670a49065d4b9fde3958dbfffe071233b9dc235 /drivers/usb
parent62f2a83de0436d5d35eefc668e3b25db54406910 (diff)
USB: serial: metro-usb: remove vendor and product module parameters
All new usb serial drivers should be using the dynamic id function, not having module parameters for this type of thing. So remove them before anyone gets used to them being there. Cc: Aleksey Babahin <tamerlan311@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/metro-usb.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c
index bb6838959876..d0c47e1dab10 100644
--- a/drivers/usb/serial/metro-usb.c
+++ b/drivers/usb/serial/metro-usb.c
@@ -8,8 +8,7 @@
8 NOTES: 8 NOTES:
9 To install the driver: 9 To install the driver:
10 1. Install the usbserial.ko module supplied by Linux with: # insmod usbserial.ko 10 1. Install the usbserial.ko module supplied by Linux with: # insmod usbserial.ko
11 2. Install the metro-usb.ko module with: # insmod metro-usb.ko vender=0x#### product=0x#### debug=1 11 2. Install the metro-usb.ko module with: # insmod metro-usb.ko
12 The vendor, product and debug parameters are optional.
13 12
14 Some of this code is credited to Linux USB open source files that are distributed with Linux. 13 Some of this code is credited to Linux USB open source files that are distributed with Linux.
15 14
@@ -54,15 +53,12 @@
54static struct usb_device_id id_table [] = { 53static struct usb_device_id id_table [] = {
55 { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID) }, 54 { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID) },
56 { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID_UNI) }, 55 { USB_DEVICE(FOCUS_VENDOR_ID, FOCUS_PRODUCT_ID_UNI) },
57 { }, /* Optional paramenter entry. */
58 { }, /* Terminating entry. */ 56 { }, /* Terminating entry. */
59}; 57};
60MODULE_DEVICE_TABLE(usb, id_table); 58MODULE_DEVICE_TABLE(usb, id_table);
61 59
62/* Input parameter constants. */ 60/* Input parameter constants. */
63static int debug; 61static bool debug;
64static __u16 vendor;
65static __u16 product;
66 62
67/* Function prototypes. */ 63/* Function prototypes. */
68static void metrousb_cleanup (struct usb_serial_port *port); 64static void metrousb_cleanup (struct usb_serial_port *port);
@@ -183,26 +179,9 @@ static void __exit metrousb_exit(void)
183static int __init metrousb_init(void) 179static int __init metrousb_init(void)
184{ 180{
185 int retval = 0; 181 int retval = 0;
186 int i = 0;
187 182
188 dbg("METRO-USB - %s", __FUNCTION__); 183 dbg("METRO-USB - %s", __FUNCTION__);
189 184
190 /* Add the device parameters if entered. */
191 if ((vendor > 0) && (product > 0)) {
192 struct usb_device_id usb_dev_temp[] = { {USB_DEVICE(vendor, product) } };
193
194 /* Find the last entry in id_table */
195 for (i=0; i < ARRAY_SIZE(id_table); i++) {
196 if (id_table[i].idVendor == 0) {
197 id_table[i] = usb_dev_temp[0];
198 break;
199 }
200 }
201
202 dbg("METRO-USB - %s - support added for unknown device: vendor=0x%x - product=0x%x", __FUNCTION__, vendor, product);
203 printk(KERN_INFO "Metro USB-POS support added for unknown device: vendor=0x%x - product=0x%x", vendor, product);
204 }
205
206 /* Register the devices. */ 185 /* Register the devices. */
207 retval = usb_serial_register_drivers(&metrousb_driver, serial_drivers); 186 retval = usb_serial_register_drivers(&metrousb_driver, serial_drivers);
208 if (retval) 187 if (retval)
@@ -606,13 +585,3 @@ MODULE_DESCRIPTION( DRIVER_DESC );
606/* Module input parameters */ 585/* Module input parameters */
607module_param(debug, bool, S_IRUGO | S_IWUSR); 586module_param(debug, bool, S_IRUGO | S_IWUSR);
608MODULE_PARM_DESC(debug, "Print debug info (bool 1=on, 0=off)"); 587MODULE_PARM_DESC(debug, "Print debug info (bool 1=on, 0=off)");
609
610module_param(vendor, ushort, 0);
611MODULE_PARM_DESC(vendor, "User specified vendor ID (ushort)");
612
613module_param(product, ushort, 0);
614MODULE_PARM_DESC(product, "User specified product ID (ushort)");
615
616
617
618