Commit 60028e60 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: convert a lot of usb drivers from MODULE_PARM to module_param

Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 3b7e5b40
...@@ -55,39 +55,39 @@ ...@@ -55,39 +55,39 @@
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
static int singlebyte = 0; static int singlebyte = 0;
MODULE_PARM(singlebyte,"i"); module_param(singlebyte, int, 0);
MODULE_PARM_DESC(singlebyte,"Enable sending MIDI messages with single message packet"); MODULE_PARM_DESC(singlebyte,"Enable sending MIDI messages with single message packet");
static int maxdevices = 4; static int maxdevices = 4;
MODULE_PARM(maxdevices,"i"); module_param(maxdevices, int, 0);
MODULE_PARM_DESC(maxdevices,"Max number of allocatable MIDI device"); MODULE_PARM_DESC(maxdevices,"Max number of allocatable MIDI device");
static int uvendor = -1; static int uvendor = -1;
MODULE_PARM(uvendor,"i"); module_param(uvendor, int, 0);
MODULE_PARM_DESC(uvendor, "The USB Vendor ID of a semi-compliant interface"); MODULE_PARM_DESC(uvendor, "The USB Vendor ID of a semi-compliant interface");
static int uproduct = -1; static int uproduct = -1;
MODULE_PARM(uproduct,"i"); module_param(uproduct, int, 0);
MODULE_PARM_DESC(uproduct, "The USB Product ID of a semi-compliant interface"); MODULE_PARM_DESC(uproduct, "The USB Product ID of a semi-compliant interface");
static int uinterface = -1; static int uinterface = -1;
MODULE_PARM(uinterface,"i"); module_param(uinterface, int, 0);
MODULE_PARM_DESC(uinterface, "The Interface number of a semi-compliant interface"); MODULE_PARM_DESC(uinterface, "The Interface number of a semi-compliant interface");
static int ualt = -1; static int ualt = -1;
MODULE_PARM(ualt,"i"); module_param(ualt, int, 0);
MODULE_PARM_DESC(ualt, "The optional alternative setting of a semi-compliant interface"); MODULE_PARM_DESC(ualt, "The optional alternative setting of a semi-compliant interface");
static int umin = -1; static int umin = -1;
MODULE_PARM(umin,"i"); module_param(umin, int, 0);
MODULE_PARM_DESC(umin, "The input endpoint of a semi-compliant interface"); MODULE_PARM_DESC(umin, "The input endpoint of a semi-compliant interface");
static int umout = -1; static int umout = -1;
MODULE_PARM(umout,"i"); module_param(umout, int, 0);
MODULE_PARM_DESC(umout, "The output endpoint of a semi-compliant interface"); MODULE_PARM_DESC(umout, "The output endpoint of a semi-compliant interface");
static int ucable = -1; static int ucable = -1;
MODULE_PARM(ucable,"i"); module_param(ucable, int, 0);
MODULE_PARM_DESC(ucable, "The cable number used for a semi-compliant interface"); MODULE_PARM_DESC(ucable, "The cable number used for a semi-compliant interface");
/** Note -- the usb_string() returns only Latin-1 characters. /** Note -- the usb_string() returns only Latin-1 characters.
...@@ -95,7 +95,7 @@ MODULE_PARM_DESC(ucable, "The cable number used for a semi-compliant interface") ...@@ -95,7 +95,7 @@ MODULE_PARM_DESC(ucable, "The cable number used for a semi-compliant interface")
* unicode16LE-to-JIS routine is needed to wrap around usb_get_string(). * unicode16LE-to-JIS routine is needed to wrap around usb_get_string().
**/ **/
static unsigned short ulangid = 0x0409; /** 0x0411 for Japanese **/ static unsigned short ulangid = 0x0409; /** 0x0411 for Japanese **/
MODULE_PARM(ulangid,"h"); module_param(ulangid, ushort, 0);
MODULE_PARM_DESC(ulangid, "The optional preferred USB Language ID for all devices"); MODULE_PARM_DESC(ulangid, "The optional preferred USB Language ID for all devices");
MODULE_AUTHOR("NAGANO Daisuke <breeze.nagano@nifty.ne.jp>"); MODULE_AUTHOR("NAGANO Daisuke <breeze.nagano@nifty.ne.jp>");
......
...@@ -1208,6 +1208,6 @@ module_exit(usblp_exit); ...@@ -1208,6 +1208,6 @@ module_exit(usblp_exit);
MODULE_AUTHOR( DRIVER_AUTHOR ); MODULE_AUTHOR( DRIVER_AUTHOR );
MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_DESCRIPTION( DRIVER_DESC );
MODULE_PARM(proto_bias, "i"); module_param(proto_bias, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(proto_bias, "Favourite protocol number"); MODULE_PARM_DESC(proto_bias, "Favourite protocol number");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -106,14 +106,14 @@ int SL11StartXaction (hci_t * hci, __u8 addr, __u8 epaddr, int pid, int len, ...@@ -106,14 +106,14 @@ int SL11StartXaction (hci_t * hci, __u8 addr, __u8 epaddr, int pid, int len,
static int sofWaitCnt = 0; static int sofWaitCnt = 0;
MODULE_PARM (urb_debug, "i"); module_param(urb_debug, int, 0);
MODULE_PARM_DESC (urb_debug, "debug urb messages, default is 0 (no)"); MODULE_PARM_DESC (urb_debug, "debug urb messages, default is 0 (no)");
MODULE_PARM (base_addr, "i"); module_param(base_addr, int, 0);
MODULE_PARM_DESC (base_addr, "sl811 base address 0xd3800000"); MODULE_PARM_DESC (base_addr, "sl811 base address 0xd3800000");
MODULE_PARM (data_reg_addr, "i"); module_param(data_reg_addr, int, 0);
MODULE_PARM_DESC (data_reg_addr, "sl811 data register address 0xd3810000"); MODULE_PARM_DESC (data_reg_addr, "sl811 data register address 0xd3810000");
MODULE_PARM (irq, "i"); module_param(irq, int, 0);
MODULE_PARM_DESC (irq, "IRQ 34 (default)"); MODULE_PARM_DESC (irq, "IRQ 34 (default)");
static int hc_reset (hci_t * hci); static int hc_reset (hci_t * hci);
......
...@@ -658,7 +658,7 @@ static int __init ohci_hcd_omap_init (void) ...@@ -658,7 +658,7 @@ static int __init ohci_hcd_omap_init (void)
return ret; return ret;
} }
MODULE_PARM(hmc_mode, "hmc_mode"); module_param(hmc_mode, int, 0);
static void __exit ohci_hcd_omap_cleanup (void) static void __exit ohci_hcd_omap_cleanup (void)
{ {
......
...@@ -82,7 +82,7 @@ static int debug = 1; ...@@ -82,7 +82,7 @@ static int debug = 1;
#else #else
static int debug = 0; static int debug = 0;
#endif #endif
MODULE_PARM(debug, "i"); module_param(debug, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug level"); MODULE_PARM_DESC(debug, "Debug level");
static char *errbuf; static char *errbuf;
#define ERRBUF_LEN (32 * 1024) #define ERRBUF_LEN (32 * 1024)
......
...@@ -2289,9 +2289,9 @@ MODULE_AUTHOR(DRIVER_AUTHOR); ...@@ -2289,9 +2289,9 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC); MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_PARM(programmableDelay, "i"); module_param(programmableDelay, int, 0);
MODULE_PARM_DESC(programmableDelay, "delay used during tablet programming"); MODULE_PARM_DESC(programmableDelay, "delay used during tablet programming");
MODULE_PARM(jitterDelay, "i"); module_param(jitterDelay, int, 0);
MODULE_PARM_DESC(jitterDelay, "stylus/mouse settlement delay"); MODULE_PARM_DESC(jitterDelay, "stylus/mouse settlement delay");
module_init(aiptek_init); module_init(aiptek_init);
......
...@@ -26,10 +26,9 @@ MODULE_LICENSE(DRIVER_LICENSE); ...@@ -26,10 +26,9 @@ MODULE_LICENSE(DRIVER_LICENSE);
#define USB_VENDOR_ID_KBGEAR 0x084e #define USB_VENDOR_ID_KBGEAR 0x084e
static int kb_pressure_click = 0x10; static int kb_pressure_click = 0x10;
MODULE_PARM (kb_pressure_click,"i"); module_param(kb_pressure_click, int, 0);
MODULE_PARM_DESC(kb_pressure_click, MODULE_PARM_DESC(kb_pressure_click, "pressure threshold for clicks");
"pressure threshold for clicks");
struct kbtab { struct kbtab {
signed char *data; signed char *data;
......
...@@ -868,7 +868,7 @@ MODULE_AUTHOR( DRIVER_AUTHOR ); ...@@ -868,7 +868,7 @@ MODULE_AUTHOR( DRIVER_AUTHOR );
MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_DESCRIPTION( DRIVER_DESC );
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_PARM (buffers, "i"); module_param(buffers, int, 0);
MODULE_PARM_DESC (buffers, "Number of buffers (default=256)"); MODULE_PARM_DESC (buffers, "Number of buffers (default=256)");
module_init (dabusb_init); module_init (dabusb_init);
......
...@@ -68,7 +68,7 @@ static const int debug = 0; ...@@ -68,7 +68,7 @@ static const int debug = 0;
/* Some default values for initial camera settings, /* Some default values for initial camera settings,
can be set by modprobe */ can be set by modprobe */
static enum frame_sizes size; static int size;
static int speed = 6; /* Speed (fps) 0 (slowest) to 6 (fastest) */ static int speed = 6; /* Speed (fps) 0 (slowest) to 6 (fastest) */
static int brightness = MAX_BRIGHTNESS/2; static int brightness = MAX_BRIGHTNESS/2;
static int contrast = MAX_CONTRAST/2; static int contrast = MAX_CONTRAST/2;
...@@ -928,23 +928,23 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -928,23 +928,23 @@ MODULE_DEVICE_TABLE(usb, id_table);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Simon Evans <spse@secret.org.uk>"); MODULE_AUTHOR("Simon Evans <spse@secret.org.uk>");
MODULE_DESCRIPTION(DRIVER_DESC); MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_PARM(speed, "i"); module_param(speed, int, 0);
MODULE_PARM_DESC(speed, "Initial speed: 0 (slowest) - 6 (fastest)"); MODULE_PARM_DESC(speed, "Initial speed: 0 (slowest) - 6 (fastest)");
MODULE_PARM(size, "i"); module_param(size, int, 0);
MODULE_PARM_DESC(size, "Initial Size 0: 160x120 1: 160x136 2: 176x144 3: 320x240"); MODULE_PARM_DESC(size, "Initial Size 0: 160x120 1: 160x136 2: 176x144 3: 320x240");
MODULE_PARM(brightness, "i"); module_param(brightness, int, 0);
MODULE_PARM_DESC(brightness, "Initial brightness 0 - 108"); MODULE_PARM_DESC(brightness, "Initial brightness 0 - 108");
MODULE_PARM(contrast, "i"); module_param(contrast, int, 0);
MODULE_PARM_DESC(contrast, "Initial contrast 0 - 108"); MODULE_PARM_DESC(contrast, "Initial contrast 0 - 108");
MODULE_PARM(saturation, "i"); module_param(saturation, int, 0);
MODULE_PARM_DESC(saturation, "Initial saturation 0 - 108"); MODULE_PARM_DESC(saturation, "Initial saturation 0 - 108");
MODULE_PARM(sharpness, "i"); module_param(sharpness, int, 0);
MODULE_PARM_DESC(sharpness, "Initial brightness 0 - 108"); MODULE_PARM_DESC(sharpness, "Initial brightness 0 - 108");
MODULE_PARM(whitebal, "i"); module_param(whitebal, int, 0);
MODULE_PARM_DESC(whitebal, "Initial white balance 0 - 363"); MODULE_PARM_DESC(whitebal, "Initial white balance 0 - 363");
#ifdef CONFIG_USB_DEBUG #ifdef CONFIG_USB_DEBUG
MODULE_PARM(debug, "i"); module_param(debug, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug level: 0-9 (default=0)"); MODULE_PARM_DESC(debug, "Debug level: 0-9 (default=0)");
#endif #endif
......
...@@ -119,78 +119,78 @@ static int remove_zeros; ...@@ -119,78 +119,78 @@ static int remove_zeros;
static int mirror; static int mirror;
static int ov518_color; static int ov518_color;
MODULE_PARM(autobright, "i"); module_param(autobright, int, 0);
MODULE_PARM_DESC(autobright, "Sensor automatically changes brightness"); MODULE_PARM_DESC(autobright, "Sensor automatically changes brightness");
MODULE_PARM(autogain, "i"); module_param(autogain, int, 0);
MODULE_PARM_DESC(autogain, "Sensor automatically changes gain"); MODULE_PARM_DESC(autogain, "Sensor automatically changes gain");
MODULE_PARM(autoexp, "i"); module_param(autoexp, int, 0);
MODULE_PARM_DESC(autoexp, "Sensor automatically changes exposure"); MODULE_PARM_DESC(autoexp, "Sensor automatically changes exposure");
MODULE_PARM(debug, "i"); module_param(debug, int, 0);
MODULE_PARM_DESC(debug, MODULE_PARM_DESC(debug,
"Debug level: 0=none, 1=inits, 2=warning, 3=config, 4=functions, 5=max"); "Debug level: 0=none, 1=inits, 2=warning, 3=config, 4=functions, 5=max");
MODULE_PARM(snapshot, "i"); module_param(snapshot, int, 0);
MODULE_PARM_DESC(snapshot, "Enable snapshot mode"); MODULE_PARM_DESC(snapshot, "Enable snapshot mode");
MODULE_PARM(cams, "i"); module_param(cams, int, 0);
MODULE_PARM_DESC(cams, "Number of simultaneous cameras"); MODULE_PARM_DESC(cams, "Number of simultaneous cameras");
MODULE_PARM(compress, "i"); module_param(compress, int, 0);
MODULE_PARM_DESC(compress, "Turn on compression"); MODULE_PARM_DESC(compress, "Turn on compression");
MODULE_PARM(testpat, "i"); module_param(testpat, int, 0);
MODULE_PARM_DESC(testpat, MODULE_PARM_DESC(testpat,
"Replace image with vertical bar testpattern (only partially working)"); "Replace image with vertical bar testpattern (only partially working)");
MODULE_PARM(dumppix, "i"); module_param(dumppix, int, 0);
MODULE_PARM_DESC(dumppix, "Dump raw pixel data"); MODULE_PARM_DESC(dumppix, "Dump raw pixel data");
MODULE_PARM(led, "i"); module_param(led, int, 0);
MODULE_PARM_DESC(led, MODULE_PARM_DESC(led,
"LED policy (OV511+ or later). 0=off, 1=on (default), 2=auto (on when open)"); "LED policy (OV511+ or later). 0=off, 1=on (default), 2=auto (on when open)");
MODULE_PARM(dump_bridge, "i"); module_param(dump_bridge, int, 0);
MODULE_PARM_DESC(dump_bridge, "Dump the bridge registers"); MODULE_PARM_DESC(dump_bridge, "Dump the bridge registers");
MODULE_PARM(dump_sensor, "i"); module_param(dump_sensor, int, 0);
MODULE_PARM_DESC(dump_sensor, "Dump the sensor registers"); MODULE_PARM_DESC(dump_sensor, "Dump the sensor registers");
MODULE_PARM(printph, "i"); module_param(printph, int, 0);
MODULE_PARM_DESC(printph, "Print frame start/end headers"); MODULE_PARM_DESC(printph, "Print frame start/end headers");
MODULE_PARM(phy, "i"); module_param(phy, int, 0);
MODULE_PARM_DESC(phy, "Prediction range (horiz. Y)"); MODULE_PARM_DESC(phy, "Prediction range (horiz. Y)");
MODULE_PARM(phuv, "i"); module_param(phuv, int, 0);
MODULE_PARM_DESC(phuv, "Prediction range (horiz. UV)"); MODULE_PARM_DESC(phuv, "Prediction range (horiz. UV)");
MODULE_PARM(pvy, "i"); module_param(pvy, int, 0);
MODULE_PARM_DESC(pvy, "Prediction range (vert. Y)"); MODULE_PARM_DESC(pvy, "Prediction range (vert. Y)");
MODULE_PARM(pvuv, "i"); module_param(pvuv, int, 0);
MODULE_PARM_DESC(pvuv, "Prediction range (vert. UV)"); MODULE_PARM_DESC(pvuv, "Prediction range (vert. UV)");
MODULE_PARM(qhy, "i"); module_param(qhy, int, 0);
MODULE_PARM_DESC(qhy, "Quantization threshold (horiz. Y)"); MODULE_PARM_DESC(qhy, "Quantization threshold (horiz. Y)");
MODULE_PARM(qhuv, "i"); module_param(qhuv, int, 0);
MODULE_PARM_DESC(qhuv, "Quantization threshold (horiz. UV)"); MODULE_PARM_DESC(qhuv, "Quantization threshold (horiz. UV)");
MODULE_PARM(qvy, "i"); module_param(qvy, int, 0);
MODULE_PARM_DESC(qvy, "Quantization threshold (vert. Y)"); MODULE_PARM_DESC(qvy, "Quantization threshold (vert. Y)");
MODULE_PARM(qvuv, "i"); module_param(qvuv, int, 0);
MODULE_PARM_DESC(qvuv, "Quantization threshold (vert. UV)"); MODULE_PARM_DESC(qvuv, "Quantization threshold (vert. UV)");
MODULE_PARM(lightfreq, "i"); module_param(lightfreq, int, 0);
MODULE_PARM_DESC(lightfreq, MODULE_PARM_DESC(lightfreq,
"Light frequency. Set to 50 or 60 Hz, or zero for default settings"); "Light frequency. Set to 50 or 60 Hz, or zero for default settings");
MODULE_PARM(bandingfilter, "i"); module_param(bandingfilter, int, 0);
MODULE_PARM_DESC(bandingfilter, MODULE_PARM_DESC(bandingfilter,
"Enable banding filter (to reduce effects of fluorescent lighting)"); "Enable banding filter (to reduce effects of fluorescent lighting)");
MODULE_PARM(clockdiv, "i"); module_param(clockdiv, int, 0);
MODULE_PARM_DESC(clockdiv, "Force pixel clock divisor to a specific value"); MODULE_PARM_DESC(clockdiv, "Force pixel clock divisor to a specific value");
MODULE_PARM(packetsize, "i"); module_param(packetsize, int, 0);
MODULE_PARM_DESC(packetsize, "Force a specific isoc packet size"); MODULE_PARM_DESC(packetsize, "Force a specific isoc packet size");
MODULE_PARM(framedrop, "i"); module_param(framedrop, int, 0);
MODULE_PARM_DESC(framedrop, "Force a specific frame drop register setting"); MODULE_PARM_DESC(framedrop, "Force a specific frame drop register setting");
MODULE_PARM(fastset, "i"); module_param(fastset, int, 0);
MODULE_PARM_DESC(fastset, "Allows picture settings to take effect immediately"); MODULE_PARM_DESC(fastset, "Allows picture settings to take effect immediately");
MODULE_PARM(force_palette, "i"); module_param(force_palette, int, 0);
MODULE_PARM_DESC(force_palette, "Force the palette to a specific value"); MODULE_PARM_DESC(force_palette, "Force the palette to a specific value");
MODULE_PARM(backlight, "i"); module_param(backlight, int, 0);
MODULE_PARM_DESC(backlight, "For objects that are lit from behind"); MODULE_PARM_DESC(backlight, "For objects that are lit from behind");
MODULE_PARM(unit_video, "1-" __MODULE_STRING(OV511_MAX_UNIT_VIDEO) "i"); /*module_param_array(unit_video, int, OV511_MAX_UNIT_VIDEO, 0); */
MODULE_PARM_DESC(unit_video, /*MODULE_PARM_DESC(unit_video,
"Force use of specific minor number(s). 0 is not allowed."); "Force use of specific minor number(s). 0 is not allowed."); */
MODULE_PARM(remove_zeros, "i"); module_param(remove_zeros, int, 0);
MODULE_PARM_DESC(remove_zeros, MODULE_PARM_DESC(remove_zeros,
"Remove zero-padding from uncompressed incoming data"); "Remove zero-padding from uncompressed incoming data");
MODULE_PARM(mirror, "i"); module_param(mirror, int, 0);
MODULE_PARM_DESC(mirror, "Reverse image horizontally"); MODULE_PARM_DESC(mirror, "Reverse image horizontally");
MODULE_PARM(ov518_color, "i"); module_param(ov518_color, int, 0);
MODULE_PARM_DESC(ov518_color, "Enable OV518 color (experimental)"); MODULE_PARM_DESC(ov518_color, "Enable OV518 color (experimental)");
MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_AUTHOR(DRIVER_AUTHOR);
......
...@@ -2009,33 +2009,35 @@ static int pwc_atoi(const char *s) ...@@ -2009,33 +2009,35 @@ static int pwc_atoi(const char *s)
* Initialization code & module stuff * Initialization code & module stuff
*/ */
static char *size = NULL; static char size[PSZ_MAX];
static int fps = 0; static int fps = 0;
static int fbufs = 0; static int fbufs = 0;
static int mbufs = 0; static int mbufs = 0;
static int trace = -1; static int trace = -1;
static int compression = -1; static int compression = -1;
static int leds[2] = { -1, -1 };
static char *dev_hint[MAX_DEV_HINTS] = { }; static char *dev_hint[MAX_DEV_HINTS] = { };
MODULE_PARM(size, "s"); module_param_string(size, size, PSZ_MAX, 0);
MODULE_PARM_DESC(size, "Initial image size. One of sqcif, qsif, qcif, sif, cif, vga"); MODULE_PARM_DESC(size, "Initial image size. One of sqcif, qsif, qcif, sif, cif, vga");
MODULE_PARM(fps, "i"); module_param(fps, int, 0);
MODULE_PARM_DESC(fps, "Initial frames per second. Varies with model, useful range 5-30"); MODULE_PARM_DESC(fps, "Initial frames per second. Varies with model, useful range 5-30");
MODULE_PARM(fbufs, "i"); module_param(fbufs, int, 0);
MODULE_PARM_DESC(fbufs, "Number of internal frame buffers to reserve"); MODULE_PARM_DESC(fbufs, "Number of internal frame buffers to reserve");
MODULE_PARM(mbufs, "i"); module_param(mbufs, int, 0);
MODULE_PARM_DESC(mbufs, "Number of external (mmap()ed) image buffers"); MODULE_PARM_DESC(mbufs, "Number of external (mmap()ed) image buffers");
MODULE_PARM(trace, "i"); module_param(trace, int, 0);
MODULE_PARM_DESC(trace, "For debugging purposes"); MODULE_PARM_DESC(trace, "For debugging purposes");
MODULE_PARM(power_save, "i"); module_param(power_save, int, 0);
MODULE_PARM_DESC(power_save, "Turn power save feature in camera on or off"); MODULE_PARM_DESC(power_save, "Turn power save feature in camera on or off");
MODULE_PARM(compression, "i"); module_param(compression, int, 0);
MODULE_PARM_DESC(compression, "Preferred compression quality. Range 0 (uncompressed) to 3 (high compression)"); MODULE_PARM_DESC(compression, "Preferred compression quality. Range 0 (uncompressed) to 3 (high compression)");
MODULE_PARM(leds, "2i"); module_param(led_on, int, 0);
MODULE_PARM_DESC(leds, "LED on,off time in milliseconds"); MODULE_PARM_DESC(led_on, "LED on time in milliseconds");
MODULE_PARM(dev_hint, "0-20s"); module_param(led_off, int, 0);
MODULE_PARM_DESC(dev_hint, "Device node hints"); MODULE_PARM_DESC(led_off, "LED off time in milliseconds");
/* Commented out, as you should be using udev instead of crud like this... */
/* MODULE_PARM(dev_hint, "0-20s"); */
/* MODULE_PARM_DESC(dev_hint, "Device node hints"); */
MODULE_DESCRIPTION("Philips & OEM USB webcam driver"); MODULE_DESCRIPTION("Philips & OEM USB webcam driver");
MODULE_AUTHOR("Nemosoft Unv. <webcam@smcc.demon.nl>"); MODULE_AUTHOR("Nemosoft Unv. <webcam@smcc.demon.nl>");
...@@ -2060,7 +2062,7 @@ static int __init usb_pwc_init(void) ...@@ -2060,7 +2062,7 @@ static int __init usb_pwc_init(void)
Info("Default framerate set to %d.\n", default_fps); Info("Default framerate set to %d.\n", default_fps);
} }
if (size) { if (strlen(size)) {
/* string; try matching with array */ /* string; try matching with array */
for (sz = 0; sz < PSZ_MAX; sz++) { for (sz = 0; sz < PSZ_MAX; sz++) {
if (!strcmp(sizenames[sz], size)) { /* Found! */ if (!strcmp(sizenames[sz], size)) { /* Found! */
...@@ -2104,10 +2106,6 @@ static int __init usb_pwc_init(void) ...@@ -2104,10 +2106,6 @@ static int __init usb_pwc_init(void)
} }
if (power_save) if (power_save)
Info("Enabling power save on open/close.\n"); Info("Enabling power save on open/close.\n");
if (leds[0] >= 0)
led_on = leds[0];
if (leds[1] >= 0)
led_off = leds[1];
/* Big device node whoopla. Basicly, it allows you to assign a /* Big device node whoopla. Basicly, it allows you to assign a
device node (/dev/videoX) to a camera, based on its type device node (/dev/videoX) to a camera, based on its type
......
...@@ -53,9 +53,9 @@ MODULE_DEVICE_TABLE(usb, device_table); ...@@ -53,9 +53,9 @@ MODULE_DEVICE_TABLE(usb, device_table);
MODULE_AUTHOR("Jeroen Vreeken <pe1rxq@amsat.org>"); MODULE_AUTHOR("Jeroen Vreeken <pe1rxq@amsat.org>");
MODULE_DESCRIPTION("SE401 USB Camera Driver"); MODULE_DESCRIPTION("SE401 USB Camera Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_PARM(flickerless, "i"); module_param(flickerless, int, 0);
MODULE_PARM_DESC(flickerless, "Net frequency to adjust exposure time to (0/50/60)"); MODULE_PARM_DESC(flickerless, "Net frequency to adjust exposure time to (0/50/60)");
MODULE_PARM(video_nr, "i"); module_param(video_nr, int, 0);
static struct usb_driver se401_driver; static struct usb_driver se401_driver;
......
...@@ -93,11 +93,11 @@ static unsigned int debug = 0; ...@@ -93,11 +93,11 @@ static unsigned int debug = 0;
MODULE_AUTHOR (DRIVER_AUTHOR); MODULE_AUTHOR (DRIVER_AUTHOR);
MODULE_DESCRIPTION (DRIVER_DESC); MODULE_DESCRIPTION (DRIVER_DESC);
MODULE_LICENSE ("GPL"); MODULE_LICENSE ("GPL");
MODULE_PARM (debug, "i"); module_param(debug, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC (debug, "Debug enabled or not"); MODULE_PARM_DESC (debug, "Debug enabled or not");
MODULE_PARM (swapRGB_on, "i"); module_param(swapRGB_on, int, 0);
MODULE_PARM_DESC (swapRGB_on, "Red/blue swap: 1=always, 0=auto, -1=never"); MODULE_PARM_DESC (swapRGB_on, "Red/blue swap: 1=always, 0=auto, -1=never");
MODULE_PARM (video_nr, "i"); module_param(video_nr, int, 0);
/******************************************************************** /********************************************************************
* *
......
...@@ -60,9 +60,9 @@ static int init_color = 128; ...@@ -60,9 +60,9 @@ static int init_color = 128;
static int init_hue = 128; static int init_hue = 128;
static int hue_correction = 128; static int hue_correction = 128;
MODULE_PARM(debug, "i"); module_param(debug, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug level: 0-9 (default=0)"); MODULE_PARM_DESC(debug, "Debug level: 0-9 (default=0)");
MODULE_PARM(flags, "i"); module_param(flags, int, 0);
MODULE_PARM_DESC(flags, MODULE_PARM_DESC(flags,
"Bitfield: 0=VIDIOCSYNC, " "Bitfield: 0=VIDIOCSYNC, "
"1=B/W, " "1=B/W, "
...@@ -71,18 +71,18 @@ MODULE_PARM_DESC(flags, ...@@ -71,18 +71,18 @@ MODULE_PARM_DESC(flags,
"4=test pattern, " "4=test pattern, "
"5=separate frames, " "5=separate frames, "
"6=clean frames"); "6=clean frames");
MODULE_PARM(framerate, "i"); module_param(framerate, int, 0);
MODULE_PARM_DESC(framerate, "Framerate setting: 0=slowest, 6=fastest (default=2)"); MODULE_PARM_DESC(framerate, "Framerate setting: 0=slowest, 6=fastest (default=2)");
MODULE_PARM(init_brightness, "i"); module_param(init_brightness, int, 0);
MODULE_PARM_DESC(init_brightness, "Brightness preconfiguration: 0-255 (default=128)"); MODULE_PARM_DESC(init_brightness, "Brightness preconfiguration: 0-255 (default=128)");
MODULE_PARM(init_contrast, "i"); module_param(init_contrast, int, 0);
MODULE_PARM_DESC(init_contrast, "Contrast preconfiguration: 0-255 (default=192)"); MODULE_PARM_DESC(init_contrast, "Contrast preconfiguration: 0-255 (default=192)");
MODULE_PARM(init_color, "i"); module_param(init_color, int, 0);
MODULE_PARM_DESC(init_color, "Color preconfiguration: 0-255 (default=128)"); MODULE_PARM_DESC(init_color, "Color preconfiguration: 0-255 (default=128)");
MODULE_PARM(init_hue, "i"); module_param(init_hue, int, 0);
MODULE_PARM_DESC(init_hue, "Hue preconfiguration: 0-255 (default=128)"); MODULE_PARM_DESC(init_hue, "Hue preconfiguration: 0-255 (default=128)");
MODULE_PARM(hue_correction, "i"); module_param(hue_correction, int, 0);
MODULE_PARM_DESC(hue_correction, "YUV colorspace regulation: 0-255 (default=128)"); MODULE_PARM_DESC(hue_correction, "YUV colorspace regulation: 0-255 (default=128)");
/* /*
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#endif #endif
static int video_nr = -1; static int video_nr = -1;
MODULE_PARM(video_nr, "i"); module_param(video_nr, int, 0);
/* /*
* Local prototypes. * Local prototypes.
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
#define DRIVER_DESC "LEGO USB Tower Driver" #define DRIVER_DESC "LEGO USB Tower Driver"
/* Module parameters */ /* Module parameters */
MODULE_PARM(debug, "i"); module_param(debug, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug enabled or not"); MODULE_PARM_DESC(debug, "Debug enabled or not");
/* The defaults are chosen to work with the latest versions of leJOS and NQC. /* The defaults are chosen to work with the latest versions of leJOS and NQC.
...@@ -114,7 +114,7 @@ MODULE_PARM_DESC(debug, "Debug enabled or not"); ...@@ -114,7 +114,7 @@ MODULE_PARM_DESC(debug, "Debug enabled or not");
* (417 for datalog uploads), and packet_timeout should be set. * (417 for datalog uploads), and packet_timeout should be set.
*/ */
static size_t read_buffer_size = 480; static size_t read_buffer_size = 480;
MODULE_PARM(read_buffer_size, "i"); module_param(read_buffer_size, int, 0);
MODULE_PARM_DESC(read_buffer_size, "Read buffer size"); MODULE_PARM_DESC(read_buffer_size, "Read buffer size");
/* Some legacy software likes to send packets in one piece. /* Some legacy software likes to send packets in one piece.
...@@ -124,7 +124,7 @@ MODULE_PARM_DESC(read_buffer_size, "Read buffer size"); ...@@ -124,7 +124,7 @@ MODULE_PARM_DESC(read_buffer_size, "Read buffer size");
* if the software is not prepared to wait long enough. * if the software is not prepared to wait long enough.
*/ */
static size_t write_buffer_size = 480; static size_t write_buffer_size = 480;
MODULE_PARM(write_buffer_size, "i"); module_param(write_buffer_size, int, 0);
MODULE_PARM_DESC(write_buffer_size, "Write buffer size"); MODULE_PARM_DESC(write_buffer_size, "Write buffer size");
/* Some legacy software expects reads to contain whole LASM packets. /* Some legacy software expects reads to contain whole LASM packets.
...@@ -138,7 +138,7 @@ MODULE_PARM_DESC(write_buffer_size, "Write buffer size"); ...@@ -138,7 +138,7 @@ MODULE_PARM_DESC(write_buffer_size, "Write buffer size");
* Set it to 0 to disable. * Set it to 0 to disable.
*/ */
static int packet_timeout = 50; static int packet_timeout = 50;
MODULE_PARM(packet_timeout, "i"); module_param(packet_timeout, int, 0);
MODULE_PARM_DESC(packet_timeout, "Packet timeout in ms"); MODULE_PARM_DESC(packet_timeout, "Packet timeout in ms");
/* Some legacy software expects blocking reads to time out. /* Some legacy software expects blocking reads to time out.
...@@ -146,7 +146,7 @@ MODULE_PARM_DESC(packet_timeout, "Packet timeout in ms"); ...@@ -146,7 +146,7 @@ MODULE_PARM_DESC(packet_timeout, "Packet timeout in ms");
* Set it to 0 to disable. * Set it to 0 to disable.
*/ */
static int read_timeout = 200; static int read_timeout = 200;
MODULE_PARM(read_timeout, "i"); module_param(read_timeout, int, 0);
MODULE_PARM_DESC(read_timeout, "Read timeout in ms"); MODULE_PARM_DESC(read_timeout, "Read timeout in ms");
/* As of kernel version 2.6.4 ehci-hcd uses an /* As of kernel version 2.6.4 ehci-hcd uses an
...@@ -159,11 +159,11 @@ MODULE_PARM_DESC(read_timeout, "Read timeout in ms"); ...@@ -159,11 +159,11 @@ MODULE_PARM_DESC(read_timeout, "Read timeout in ms");
* or set to 0 to use the standard interval from the endpoint descriptors. * or set to 0 to use the standard interval from the endpoint descriptors.
*/ */
static int interrupt_in_interval = 2; static int interrupt_in_interval = 2;
MODULE_PARM(interrupt_in_interval, "i"); module_param(interrupt_in_interval, int, 0);
MODULE_PARM_DESC(interrupt_in_interval, "Interrupt in interval in ms"); MODULE_PARM_DESC(interrupt_in_interval, "Interrupt in interval in ms");
static int interrupt_out_interval = 8; static int interrupt_out_interval = 8;
MODULE_PARM(interrupt_out_interval, "i"); module_param(interrupt_out_interval, int, 0);
MODULE_PARM_DESC(interrupt_out_interval, "Interrupt out interval in ms"); MODULE_PARM_DESC(interrupt_out_interval, "Interrupt out interval in ms");
/* Define these values to match your device */ /* Define these values to match your device */
......
...@@ -560,7 +560,7 @@ MODULE_AUTHOR (DRIVER_AUTHOR); ...@@ -560,7 +560,7 @@ MODULE_AUTHOR (DRIVER_AUTHOR);
MODULE_DESCRIPTION (DRIVER_DESC); MODULE_DESCRIPTION (DRIVER_DESC);
MODULE_LICENSE (DRIVER_LICENSE); MODULE_LICENSE (DRIVER_LICENSE);
MODULE_PARM (timeout, "i"); module_param(timeout, int, 0);
MODULE_PARM_DESC (timeout, "Timeout in tenths of seconds (default=1.5 seconds)"); MODULE_PARM_DESC (timeout, "Timeout in tenths of seconds (default=1.5 seconds)");
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
...@@ -78,8 +78,8 @@ static struct usb_device_id pegasus_ids[] = { ...@@ -78,8 +78,8 @@ static struct usb_device_id pegasus_ids[] = {
MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC); MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_PARM(loopback, "i"); module_param(loopback, bool, 0);
MODULE_PARM(mii_mode, "i"); module_param(mii_mode, bool, 0);
MODULE_PARM_DESC(loopback, "Enable MAC loopback mode (bit 0)"); MODULE_PARM_DESC(loopback, "Enable MAC loopback mode (bit 0)");
MODULE_PARM_DESC(mii_mode, "Enable HomePNA mode (bit 0),default=MII mode = 0"); MODULE_PARM_DESC(mii_mode, "Enable HomePNA mode (bit 0),default=MII mode = 0");
......
...@@ -268,7 +268,7 @@ static const char driver_name [] = "usbnet"; ...@@ -268,7 +268,7 @@ static const char driver_name [] = "usbnet";
/* use ethtool to change the level for any given device */ /* use ethtool to change the level for any given device */
static int msg_level = 1; static int msg_level = 1;
MODULE_PARM (msg_level, "i"); module_param (msg_level, int, 0);
MODULE_PARM_DESC (msg_level, "Initial message level (default = 1)"); MODULE_PARM_DESC (msg_level, "Initial message level (default = 1)");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment