On Thu, Apr 15, 2004 at 02:51:18PM -0400, Alan Stern wrote:
> For Linux 2.6 you could use module_param instead of MODULE_PARM.  That 
> will allow you to specify the type as ushort.

Ah, ok. Hmm, strange - I tried this but, although modinfo says that
there is a vendor and product parameter, I get this: 

europa:/usr/src/linux-2.6.5-hynixusbhost1# insmod drivers/usb/serial/usbserial.ko 
vendor=0x0525 product=0xa4a6
insmod: error inserting 'drivers/usb/serial/usbserial.ko': -1 Unknown symbol in module
europa:/usr/src/linux-2.6.5-hynixusbhost1# tail -n 1 /var/log/syslog
Apr 15 21:43:32 europa kernel: usbserial: Unknown parameter `vendor'

Strange...

----------8<----------
--- ../linux-2.6.5/drivers/usb/serial/generic.c 2004-04-04 05:36:18.000000000 +0200
+++ drivers/usb/serial/generic.c        2004-04-15 21:42:25.000000000 +0200
@@ -16,6 +16,7 @@
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/usb.h>
 #include <asm/uaccess.h>
 
@@ -29,13 +30,14 @@
 
        
 #ifdef CONFIG_USB_SERIAL_GENERIC
+/* 'h' is signed, so we use 'l' here to get full 16 bits */
 static __u16 vendor  = 0x05f9;
 static __u16 product = 0xffff;
 
-MODULE_PARM(vendor, "h");
+module_param(vendor, ushort, 666);
 MODULE_PARM_DESC(vendor, "User specified USB idVendor");
 
-MODULE_PARM(product, "h");
+module_param(product, ushort, 666);
 MODULE_PARM_DESC(product, "User specified USB idProduct");
 
 static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */
----------8<----------

Robert 
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hornemannstra�e 12,  31137 Hildesheim, Germany
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to