[PATCH 05/24] USB: serial: remove generic vendor/product module parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove the vendor and product module parameters which were added a long
time ago when we did not have the dynamic sysfs interface to add new
device ids (and which isn't limited to a single new vid/pid pair).

A vid/pid pair can be added dynamically using sysfs, for example:

  echo 1234 5678 >/sys/bus/usb-serial/drivers/generic/new_id

Signed-off-by: Johan Hovold <jhovold@xxxxxxxxx>
---
 drivers/usb/serial/generic.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 1f31e6b..0416575 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -25,17 +25,7 @@
 #include <linux/serial.h>
 
 #ifdef CONFIG_USB_SERIAL_GENERIC
-
-static __u16 vendor  = 0x05f9;
-static __u16 product = 0xffff;
-
-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");
-
-static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */
+static struct usb_device_id generic_device_ids[1];	/* terminator only */
 
 /* All of the device info needed for the Generic Serial Converter */
 struct usb_serial_driver usb_serial_generic_device = {
@@ -61,11 +51,6 @@ int usb_serial_generic_register(void)
 	int retval = 0;
 
 #ifdef CONFIG_USB_SERIAL_GENERIC
-	generic_device_ids[0].idVendor = vendor;
-	generic_device_ids[0].idProduct = product;
-	generic_device_ids[0].match_flags =
-		USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT;
-
 	/* register our generic driver with ourselves */
 	retval = usb_serial_register_drivers(serial_drivers,
 			"usbserial_generic", generic_device_ids);
-- 
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux