From 9229204bae3b2928b68351bc3a2c26769ea74047 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 19 Oct 2004 18:10:43 -0700 Subject: [PATCH] [PATCH] module_param_array() should take a pointer module_param_array() takes a variable to put the number of elements in. Looking through the uses, many people don't care, so they declare a dummy or share one variable between several parameters. The latter is problematic because sysfs uses that number to decide how many to display. The solution is to change the variable arg to a pointer, and if the pointer is NULL, use the "max" value. This change is fairly small, but fixing up the callers is a lot of (trivial) churn. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/ipmi/ipmi_si_intf.c | 12 +++---- drivers/eisa/eisa-bus.c | 4 +-- drivers/i2c/busses/scx200_acb.c | 3 +- drivers/input/joystick/amijoy.c | 3 +- drivers/input/joystick/analog.c | 2 +- drivers/input/joystick/db9.c | 6 ++-- drivers/input/joystick/gamecon.c | 6 ++-- drivers/input/joystick/turbografx.c | 6 ++-- drivers/net/acenic.c | 15 ++++---- drivers/net/pcnet32.c | 7 ++-- drivers/pcmcia/i82365.c | 2 +- drivers/pcmcia/tcic.c | 2 +- drivers/s390/block/xpram.c | 3 +- drivers/scsi/pcmcia/sym53c500_cs.c | 3 +- drivers/scsi/tmscsim.c | 3 +- drivers/serial/8250.c | 2 +- drivers/serial/serial_cs.c | 2 +- drivers/usb/gadget/file_storage.c | 8 ++--- drivers/usb/media/sn9c102_core.c | 3 +- drivers/usb/media/w9968cf.c | 48 +++++++++++++------------- include/linux/i2c.h | 2 +- include/linux/moduleparam.h | 10 +++--- kernel/params.c | 4 +-- net/decnet/dn_dev.c | 3 +- net/ipv4/ipvs/ip_vs_ftp.c | 3 +- net/ipv4/netfilter/ip_conntrack_ftp.c | 2 +- net/ipv4/netfilter/ip_conntrack_irc.c | 2 +- net/ipv4/netfilter/ip_conntrack_tftp.c | 2 +- net/ipv4/netfilter/ip_nat_ftp.c | 2 +- net/ipv4/netfilter/ip_nat_irc.c | 2 +- net/ipv4/netfilter/ip_nat_tftp.c | 2 +- sound/core/memalloc.c | 3 +- sound/core/oss/pcm_oss.c | 5 ++- sound/core/rawmidi.c | 5 ++- sound/core/seq/seq.c | 3 +- sound/drivers/dummy.c | 13 ++++--- sound/drivers/mpu401/mpu401.c | 13 ++++--- sound/drivers/serial-u16550.c | 23 ++++++------ sound/drivers/virmidi.c | 9 +++-- sound/isa/ad1816a/ad1816a.c | 21 ++++++----- sound/isa/ad1848/ad1848.c | 15 ++++---- sound/isa/als100.c | 21 ++++++----- sound/isa/azt2320.c | 23 ++++++------ sound/isa/cmi8330.c | 23 ++++++------ sound/isa/cs423x/cs4231.c | 19 +++++----- sound/isa/cs423x/cs4236.c | 27 +++++++-------- sound/isa/dt019x.c | 19 +++++----- sound/isa/es1688/es1688.c | 17 +++++---- sound/isa/es18xx.c | 21 ++++++----- sound/isa/gus/gusclassic.c | 21 ++++++----- sound/isa/gus/gusextreme.c | 29 ++++++++-------- sound/isa/gus/gusmax.c | 21 ++++++----- sound/isa/gus/interwave.c | 27 +++++++-------- sound/isa/opl3sa2.c | 27 +++++++-------- sound/isa/sb/es968.c | 13 ++++--- sound/isa/sb/sb16.c | 29 ++++++++-------- sound/isa/sb/sb8.c | 13 ++++--- sound/isa/sgalaxy.c | 13 ++++--- sound/isa/sscape.c | 13 ++++--- sound/isa/wavefront/wavefront.c | 29 ++++++++-------- sound/parisc/harmony.c | 7 ++-- sound/pci/ali5451/ali5451.c | 11 +++--- sound/pci/als4000.c | 9 +++-- sound/pci/atiixp.c | 11 +++--- sound/pci/atiixp_modem.c | 9 +++-- sound/pci/au88x0/au88x0.c | 9 +++-- sound/pci/azt3328.c | 9 +++-- sound/pci/bt87x.c | 9 +++-- sound/pci/cmipci.c | 15 ++++---- sound/pci/cs4281.c | 9 +++-- sound/pci/cs46xx/cs46xx.c | 13 ++++--- sound/pci/emu10k1/emu10k1.c | 19 +++++----- sound/pci/ens1370.c | 11 +++--- sound/pci/es1938.c | 7 ++-- sound/pci/es1968.c | 21 ++++++----- sound/pci/fm801.c | 9 +++-- sound/pci/ice1712/ice1712.c | 13 ++++--- sound/pci/intel8x0.c | 17 +++++---- sound/pci/intel8x0m.c | 9 +++-- sound/pci/korg1212/korg1212.c | 7 ++-- sound/pci/maestro3.c | 11 +++--- sound/pci/mixart/mixart.c | 7 ++-- sound/pci/nm256/nm256.c | 19 +++++----- sound/pci/rme32.c | 9 +++-- sound/pci/rme9652/hdsp.c | 11 +++--- sound/pci/rme9652/rme9652.c | 9 +++-- sound/pci/sonicvibes.c | 11 +++--- sound/pci/trident/trident.c | 11 +++--- sound/pci/via82xx.c | 17 +++++---- sound/pci/vx222/vx222.c | 11 +++--- sound/pci/ymfpci/ymfpci.c | 15 ++++---- sound/pcmcia/pdaudiocf/pdaudiocf.c | 9 +++-- sound/pcmcia/vx/vxpocket.c | 11 +++--- sound/sparc/amd7930.c | 7 ++-- sound/sparc/cs4231.c | 7 ++-- sound/usb/usbaudio.c | 11 +++--- sound/usb/usx2y/usbusx2y.c | 7 ++-- 97 files changed, 510 insertions(+), 586 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 002a7ef2c3a0c..9793c70ba5ff3 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -923,34 +923,34 @@ MODULE_PARM_DESC(type, "Defines the type of each interface, each" " interface separated by commas. The types are 'kcs'," " 'smic', and 'bt'. For example si_type=kcs,bt will set" " the first interface to kcs and the second to bt"); -module_param_array(addrs, long, num_addrs, 0); +module_param_array(addrs, long, &num_addrs, 0); MODULE_PARM_DESC(addrs, "Sets the memory address of each interface, the" " addresses separated by commas. Only use if an interface" " is in memory. Otherwise, set it to zero or leave" " it blank."); -module_param_array(ports, int, num_ports, 0); +module_param_array(ports, int, &num_ports, 0); MODULE_PARM_DESC(ports, "Sets the port address of each interface, the" " addresses separated by commas. Only use if an interface" " is a port. Otherwise, set it to zero or leave" " it blank."); -module_param_array(irqs, int, num_irqs, 0); +module_param_array(irqs, int, &num_irqs, 0); MODULE_PARM_DESC(irqs, "Sets the interrupt of each interface, the" " addresses separated by commas. Only use if an interface" " has an interrupt. Otherwise, set it to zero or leave" " it blank."); -module_param_array(regspacings, int, num_regspacings, 0); +module_param_array(regspacings, int, &num_regspacings, 0); MODULE_PARM_DESC(regspacings, "The number of bytes between the start address" " and each successive register used by the interface. For" " instance, if the start address is 0xca2 and the spacing" " is 2, then the second address is at 0xca4. Defaults" " to 1."); -module_param_array(regsizes, int, num_regsizes, 0); +module_param_array(regsizes, int, &num_regsizes, 0); MODULE_PARM_DESC(regsizes, "The size of the specific IPMI register in bytes." " This should generally be 1, 2, 4, or 8 for an 8-bit," " 16-bit, 32-bit, or 64-bit register. Use this if you" " the 8-bit IPMI register has to be read from a larger" " register."); -module_param_array(regshifts, int, num_regshifts, 0); +module_param_array(regshifts, int, &num_regshifts, 0); MODULE_PARM_DESC(regshifts, "The amount to shift the data read from the." " IPMI register, in bits. For instance, if the data" " is read from a 32-bit word and the IPMI data is in" diff --git a/drivers/eisa/eisa-bus.c b/drivers/eisa/eisa-bus.c index af825fc3018e2..6381ba53853c2 100644 --- a/drivers/eisa/eisa-bus.c +++ b/drivers/eisa/eisa-bus.c @@ -418,8 +418,8 @@ static int __init eisa_init (void) return 0; } -module_param_array(enable_dev, int, enable_dev_count, 0444); -module_param_array(disable_dev, int, disable_dev_count, 0444); +module_param_array(enable_dev, int, &enable_dev_count, 0444); +module_param_array(disable_dev, int, &disable_dev_count, 0444); postcore_initcall (eisa_init); diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index b402aadf6702a..08d7c60a30484 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c @@ -45,8 +45,7 @@ MODULE_LICENSE("GPL"); #define MAX_DEVICES 4 static int base[MAX_DEVICES] = { 0x820, 0x840 }; -static int num_base; -module_param_array(base, int, num_base, 0); +module_param_array(base, int, NULL, 0); MODULE_PARM_DESC(base, "Base addresses for the ACCESS.bus controllers"); #ifdef DEBUG diff --git a/drivers/input/joystick/amijoy.c b/drivers/input/joystick/amijoy.c index 8b5fc358d8060..cf36ca9b92f3f 100644 --- a/drivers/input/joystick/amijoy.c +++ b/drivers/input/joystick/amijoy.c @@ -46,8 +46,7 @@ MODULE_DESCRIPTION("Driver for Amiga joysticks"); MODULE_LICENSE("GPL"); static int amijoy[2] = { 0, 1 }; -static int amijoy_nargs; -module_param_array_named(map, amijoy, uint, amijoy_nargs, 0); +module_param_array_named(map, amijoy, uint, NULL, 0); MODULE_PARM_DESC(map, "Map of attached joysticks in form of , (default is 0,1)"); __obsolete_setup("amijoy="); diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c index 7e52f96096a9f..df7b2aadbf861 100644 --- a/drivers/input/joystick/analog.c +++ b/drivers/input/joystick/analog.c @@ -53,7 +53,7 @@ MODULE_LICENSE("GPL"); static char *js[ANALOG_PORTS]; static int js_nargs; static int analog_options[ANALOG_PORTS]; -module_param_array_named(map, js, charp, js_nargs, 0); +module_param_array_named(map, js, charp, &js_nargs, 0); MODULE_PARM_DESC(map, "Describes analog joysticks type/capabilities"); __obsolete_setup("js="); diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c index 5ad612751c818..c5c6115dc4c5c 100644 --- a/drivers/input/joystick/db9.c +++ b/drivers/input/joystick/db9.c @@ -45,17 +45,17 @@ MODULE_LICENSE("GPL"); static int db9[] __initdata = { -1, 0 }; static int db9_nargs __initdata = 0; -module_param_array_named(dev, db9, int, db9_nargs, 0); +module_param_array_named(dev, db9, int, &db9_nargs, 0); MODULE_PARM_DESC(dev, "Describes first attached device (,)"); static int db9_2[] __initdata = { -1, 0 }; static int db9_nargs_2 __initdata = 0; -module_param_array_named(dev2, db9_2, int, db9_nargs_2, 0); +module_param_array_named(dev2, db9_2, int, &db9_nargs_2, 0); MODULE_PARM_DESC(dev2, "Describes second attached device (,)"); static int db9_3[] __initdata = { -1, 0 }; static int db9_nargs_3 __initdata = 0; -module_param_array_named(dev3, db9_3, int, db9_nargs_3, 0); +module_param_array_named(dev3, db9_3, int, &db9_nargs_3, 0); MODULE_PARM_DESC(dev3, "Describes third attached device (,)"); __obsolete_setup("db9="); diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index 46326b701743d..3f2cdb6a32a20 100644 --- a/drivers/input/joystick/gamecon.c +++ b/drivers/input/joystick/gamecon.c @@ -43,17 +43,17 @@ MODULE_LICENSE("GPL"); static int gc[] __initdata = { -1, 0, 0, 0, 0, 0 }; static int gc_nargs __initdata = 0; -module_param_array_named(map, gc, int, gc_nargs, 0); +module_param_array_named(map, gc, int, &gc_nargs, 0); MODULE_PARM_DESC(map, "Describers first set of devices (,,,..)"); static int gc_2[] __initdata = { -1, 0, 0, 0, 0, 0 }; static int gc_nargs_2 __initdata = 0; -module_param_array_named(map2, gc_2, int, gc_nargs_2, 0); +module_param_array_named(map2, gc_2, int, &gc_nargs_2, 0); MODULE_PARM_DESC(map2, "Describers second set of devices"); static int gc_3[] __initdata = { -1, 0, 0, 0, 0, 0 }; static int gc_nargs_3 __initdata = 0; -module_param_array_named(map3, gc_3, int, gc_nargs_3, 0); +module_param_array_named(map3, gc_3, int, &gc_nargs_3, 0); MODULE_PARM_DESC(map3, "Describers third set of devices"); __obsolete_setup("gc="); diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c index 123ff5f9d42a1..0e620cb882cdb 100644 --- a/drivers/input/joystick/turbografx.c +++ b/drivers/input/joystick/turbografx.c @@ -44,17 +44,17 @@ MODULE_LICENSE("GPL"); static int tgfx[] __initdata = { -1, 0, 0, 0, 0, 0, 0, 0 }; static int tgfx_nargs __initdata = 0; -module_param_array_named(map, tgfx, int, tgfx_nargs, 0); +module_param_array_named(map, tgfx, int, &tgfx_nargs, 0); MODULE_PARM_DESC(map, "Describes first set of devices (,,,.."); static int tgfx_2[] __initdata = { -1, 0, 0, 0, 0, 0, 0, 0 }; static int tgfx_nargs_2 __initdata = 0; -module_param_array_named(map2, tgfx_2, int, tgfx_nargs_2, 0); +module_param_array_named(map2, tgfx_2, int, &tgfx_nargs_2, 0); MODULE_PARM_DESC(map2, "Describes second set of devices"); static int tgfx_3[] __initdata = { -1, 0, 0, 0, 0, 0, 0, 0 }; static int tgfx_nargs_3 __initdata = 0; -module_param_array_named(map3, tgfx_3, int, tgfx_nargs_3, 0); +module_param_array_named(map3, tgfx_3, int, &tgfx_nargs_3, 0); MODULE_PARM_DESC(map3, "Describes third set of devices"); __obsolete_setup("tgfx="); diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c index cc56ca3ac02a8..492ae24203d18 100644 --- a/drivers/net/acenic.c +++ b/drivers/net/acenic.c @@ -427,14 +427,13 @@ MODULE_AUTHOR("Jes Sorensen "); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("AceNIC/3C985/GA620 Gigabit Ethernet driver"); -static int num_params; -module_param_array(link, int, num_params, 0); -module_param_array(trace, int, num_params, 0); -module_param_array(tx_coal_tick, int, num_params, 0); -module_param_array(max_tx_desc, int, num_params, 0); -module_param_array(rx_coal_tick, int, num_params, 0); -module_param_array(max_rx_desc, int, num_params, 0); -module_param_array(tx_ratio, int, num_params, 0); +module_param_array(link, int, NULL, 0); +module_param_array(trace, int, NULL, 0); +module_param_array(tx_coal_tick, int, NULL, 0); +module_param_array(max_tx_desc, int, NULL, 0); +module_param_array(rx_coal_tick, int, NULL, 0); +module_param_array(max_rx_desc, int, NULL, 0); +module_param_array(tx_ratio, int, NULL, 0); MODULE_PARM_DESC(link, "AceNIC/3C985/NetGear link state"); MODULE_PARM_DESC(trace, "AceNIC/3C985/NetGear firmware trace level"); MODULE_PARM_DESC(tx_coal_tick, "AceNIC/3C985/GA620 max clock ticks to wait from first tx descriptor arrives"); diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index effbad31d11eb..a0af06c18a23c 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c @@ -2264,7 +2264,6 @@ static struct pci_driver pcnet32_driver = { static int debug = -1; static int tx_start_pt = -1; static int pcnet32_have_pci; -static int num_params; module_param(debug, int, 0); MODULE_PARM_DESC(debug, DRV_NAME " debug level"); @@ -2276,12 +2275,12 @@ module_param(tx_start_pt, int, 0); MODULE_PARM_DESC(tx_start_pt, DRV_NAME " transmit start point (0-3)"); module_param(pcnet32vlb, int, 0); MODULE_PARM_DESC(pcnet32vlb, DRV_NAME " Vesa local bus (VLB) support (0/1)"); -module_param_array(options, int, num_params, 0); +module_param_array(options, int, NULL, 0); MODULE_PARM_DESC(options, DRV_NAME " initial option setting(s) (0-15)"); -module_param_array(full_duplex, int, num_params, 0); +module_param_array(full_duplex, int, NULL, 0); MODULE_PARM_DESC(full_duplex, DRV_NAME " full duplex setting(s) (1)"); /* Module Parameter for HomePNA cards added by Patrick Simmons, 2004 */ -module_param_array(homepna, int, num_params, 0); +module_param_array(homepna, int, NULL, 0); MODULE_PARM_DESC(homepna, DRV_NAME " mode for 79C978 cards (1 for HomePNA, 0 for Ethernet, default Ethernet"); MODULE_AUTHOR("Thomas Bogendoerfer"); diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c index 561974efbe63d..fd404eee5c6ff 100644 --- a/drivers/pcmcia/i82365.c +++ b/drivers/pcmcia/i82365.c @@ -134,7 +134,7 @@ module_param(i365_base, int, 0444); module_param(ignore, int, 0444); module_param(extra_sockets, int, 0444); module_param(irq_mask, int, 0444); -module_param_array(irq_list, int, irq_list_count, 0444); +module_param_array(irq_list, int, &irq_list_count, 0444); module_param(cs_irq, int, 0444); module_param(async_clock, int, 0444); module_param(cable_mode, int, 0444); diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c index d986d13f288bb..0bb9017d0b77e 100644 --- a/drivers/pcmcia/tcic.c +++ b/drivers/pcmcia/tcic.c @@ -109,7 +109,7 @@ module_param(tcic_base, int, 0444); module_param(ignore, int, 0444); module_param(do_scan, int, 0444); module_param(irq_mask, int, 0444); -module_param_array(irq_list, int, irq_list_count, 0444); +module_param_array(irq_list, int, &irq_list_count, 0444); module_param(cs_irq, int, 0444); module_param(poll_interval, int, 0444); module_param(poll_quick, int, 0444); diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c index 312057e93b28d..d428c909b8a05 100644 --- a/drivers/s390/block/xpram.c +++ b/drivers/s390/block/xpram.c @@ -74,10 +74,9 @@ static int xpram_devs; */ static int devs = XPRAM_DEVS; static unsigned int sizes[XPRAM_MAX_DEVS]; -static unsigned int sizes_count; module_param(devs, int, 0); -module_param_array(sizes, int, sizes_count, 0); +module_param_array(sizes, int, NULL, 0); MODULE_PARM_DESC(devs, "number of devices (\"partitions\"), " \ "the default is " __MODULE_STRING(XPRAM_DEVS) "\n"); diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index 4277db3b6fee4..a58dc7e6301e4 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c @@ -97,11 +97,10 @@ static char *version = /* Bit map of interrupts to choose from */ static unsigned int irq_mask = 0xdeb8; /* 3, 6, 7, 9-12, 14, 15 */ static int irq_list[4] = { -1 }; -static int num_irqs = 1; module_param(irq_mask, int, 0); MODULE_PARM_DESC(irq_mask, "IRQ mask bits (default: 0xdeb8)"); -module_param_array(irq_list, int, num_irqs, 0); +module_param_array(irq_list, int, NULL, 0); MODULE_PARM_DESC(irq_list, "Comma-separated list of up to 4 IRQs to try (default: auto select)."); /* ================================================================== */ diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c index 8513ed699e245..4a6e8d2c89a85 100644 --- a/drivers/scsi/tmscsim.c +++ b/drivers/scsi/tmscsim.c @@ -282,9 +282,8 @@ static u8 dc390_adapterCnt = 0; /* Startup values, to be overriden on the commandline */ static int tmscsim[] = {-2, -2, -2, -2, -2, -2}; -static int tmscsim_paramnum = ARRAY_SIZE(tmscsim); -module_param_array(tmscsim, int, tmscsim_paramnum, 0); +module_param_array(tmscsim, int, NULL, 0); MODULE_PARM_DESC(tmscsim, "Host SCSI ID, Speed (0=10MHz), Device Flags, Adapter Flags, Max Tags (log2(tags)-1), DelayReset (s)"); MODULE_AUTHOR("C.L. Huang / Kurt Garloff"); MODULE_DESCRIPTION("SCSI host adapter driver for Tekram DC390 and other AMD53C974A based PCI SCSI adapters"); diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index b0fc3fb35e8e4..a5e821bbcd735 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -2430,7 +2430,7 @@ MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices" " (unsafe)"); #ifdef CONFIG_SERIAL_8250_RSA -module_param_array(probe_rsa, ulong, probe_rsa_count, 0444); +module_param_array(probe_rsa, ulong, &probe_rsa_count, 0444); MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA"); #endif MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 8557ed1ce7f5f..a36650b87fb2e 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c @@ -81,7 +81,7 @@ static int do_sound = 1; static int buggy_uart; module_param(irq_mask, uint, 0444); -module_param_array(irq_list, int, irq_list_count, 0444); +module_param_array(irq_list, int, &irq_list_count, 0444); module_param(do_sound, int, 0444); module_param(buggy_uart, int, 0444); diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index d8c8ab7750ec5..1fe4a6fca50c6 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -369,16 +369,16 @@ static struct { }; -module_param_array(file, charp, mod_data.num_filenames, S_IRUGO); +module_param_array(file, charp, &mod_data.num_filenames, S_IRUGO); MODULE_PARM_DESC(file, "names of backing files or devices"); -module_param_array(ro, bool, mod_data.num_ros, S_IRUGO); +module_param_array(ro, bool, &mod_data.num_ros, S_IRUGO); MODULE_PARM_DESC(ro, "true to force read-only"); -module_param_named(luns, mod_data.nluns, uint, S_IRUGO); +module_param_named(luns, &mod_data.nluns, uint, S_IRUGO); MODULE_PARM_DESC(luns, "number of LUNs"); -module_param_named(removable, mod_data.removable, bool, S_IRUGO); +module_param_named(removable, &mod_data.removable, bool, S_IRUGO); MODULE_PARM_DESC(removable, "true to simulate removable media"); diff --git a/drivers/usb/media/sn9c102_core.c b/drivers/usb/media/sn9c102_core.c index 6d428a5b8d03c..96ae7b103ff88 100644 --- a/drivers/usb/media/sn9c102_core.c +++ b/drivers/usb/media/sn9c102_core.c @@ -53,8 +53,7 @@ MODULE_VERSION(SN9C102_MODULE_VERSION); MODULE_LICENSE(SN9C102_MODULE_LICENSE); static short video_nr[] = {[0 ... SN9C102_MAX_DEVICES-1] = -1}; -static unsigned int nv; -module_param_array(video_nr, short, nv, 0444); +module_param_array(video_nr, short, NULL, 0444); MODULE_PARM_DESC(video_nr, "\n<-1|n[,...]> Specify V4L2 minor mode number." "\n -1 = use next available (default)" diff --git a/drivers/usb/media/w9968cf.c b/drivers/usb/media/w9968cf.c index 36fbe800f368a..3131a509b6505 100644 --- a/drivers/usb/media/w9968cf.c +++ b/drivers/usb/media/w9968cf.c @@ -111,30 +111,30 @@ module_param(ovmod_load, bool, 0644); module_param(vppmod_load, bool, 0444); #endif module_param(simcams, ushort, 0644); -module_param_array(video_nr, short, param_nv[0], 0444); -module_param_array(packet_size, uint, param_nv[1], 0444); -module_param_array(max_buffers, ushort, param_nv[2], 0444); -module_param_array(double_buffer, bool, param_nv[3], 0444); -module_param_array(clamping, bool, param_nv[4], 0444); -module_param_array(filter_type, ushort, param_nv[5], 0444); -module_param_array(largeview, bool, param_nv[6], 0444); -module_param_array(decompression, ushort, param_nv[7], 0444); -module_param_array(upscaling, bool, param_nv[8], 0444); -module_param_array(force_palette, ushort, param_nv[9], 0444); -module_param_array(force_rgb, ushort, param_nv[10], 0444); -module_param_array(autobright, bool, param_nv[11], 0444); -module_param_array(autoexp, bool, param_nv[12], 0444); -module_param_array(lightfreq, ushort, param_nv[13], 0444); -module_param_array(bandingfilter, bool, param_nv[14], 0444); -module_param_array(clockdiv, short, param_nv[15], 0444); -module_param_array(backlight, bool, param_nv[16], 0444); -module_param_array(mirror, bool, param_nv[17], 0444); -module_param_array(monochrome, bool, param_nv[18], 0444); -module_param_array(brightness, uint, param_nv[19], 0444); -module_param_array(hue, uint, param_nv[20], 0444); -module_param_array(colour, uint, param_nv[21], 0444); -module_param_array(contrast, uint, param_nv[22], 0444); -module_param_array(whiteness, uint, param_nv[23], 0444); +module_param_array(video_nr, short, ¶m_nv[0], 0444); +module_param_array(packet_size, uint, ¶m_nv[1], 0444); +module_param_array(max_buffers, ushort, ¶m_nv[2], 0444); +module_param_array(double_buffer, bool, ¶m_nv[3], 0444); +module_param_array(clamping, bool, ¶m_nv[4], 0444); +module_param_array(filter_type, ushort, ¶m_nv[5], 0444); +module_param_array(largeview, bool, ¶m_nv[6], 0444); +module_param_array(decompression, ushort, ¶m_nv[7], 0444); +module_param_array(upscaling, bool, ¶m_nv[8], 0444); +module_param_array(force_palette, ushort, ¶m_nv[9], 0444); +module_param_array(force_rgb, ushort, ¶m_nv[10], 0444); +module_param_array(autobright, bool, ¶m_nv[11], 0444); +module_param_array(autoexp, bool, ¶m_nv[12], 0444); +module_param_array(lightfreq, ushort, ¶m_nv[13], 0444); +module_param_array(bandingfilter, bool, ¶m_nv[14], 0444); +module_param_array(clockdiv, short, ¶m_nv[15], 0444); +module_param_array(backlight, bool, ¶m_nv[16], 0444); +module_param_array(mirror, bool, ¶m_nv[17], 0444); +module_param_array(monochrome, bool, ¶m_nv[18], 0444); +module_param_array(brightness, uint, ¶m_nv[19], 0444); +module_param_array(hue, uint, ¶m_nv[20], 0444); +module_param_array(colour, uint, ¶m_nv[21], 0444); +module_param_array(contrast, uint, ¶m_nv[22], 0444); +module_param_array(whiteness, uint, ¶m_nv[23], 0444); #ifdef W9968CF_DEBUG module_param(debug, ushort, 0644); module_param(specific_debug, bool, 0644); diff --git a/include/linux/i2c.h b/include/linux/i2c.h index caac24868d855..bd2735bdca6bb 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -568,7 +568,7 @@ union i2c_smbus_data { static unsigned short var[I2C_CLIENT_MAX_OPTS] = I2C_CLIENT_DEFAULTS; \ static unsigned int var##_num; \ /*MODULE_PARM(var,I2C_CLIENT_MODPARM);*/ \ - module_param_array(var, short, var##_num, 0); \ + module_param_array(var, short, &var##_num, 0); \ MODULE_PARM_DESC(var,desc) /* This is the one you want to use in your own modules */ diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 7a145cd86c40e..4e6e7a51d74f9 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -129,16 +129,16 @@ extern int param_set_invbool(const char *val, struct kernel_param *kp); extern int param_get_invbool(char *buffer, struct kernel_param *kp); #define param_check_invbool(name, p) __param_check(name, p, int) -/* Comma-separated array: num is set to number they actually specified. */ -#define module_param_array_named(name, array, type, num, perm) \ +/* Comma-separated array: *nump is set to number they actually specified. */ +#define module_param_array_named(name, array, type, nump, perm) \ static struct kparam_array __param_arr_##name \ - = { ARRAY_SIZE(array), &num, param_set_##type, param_get_##type,\ + = { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type,\ sizeof(array[0]), array }; \ module_param_call(name, param_array_set, param_array_get, \ &__param_arr_##name, perm) -#define module_param_array(name, type, num, perm) \ - module_param_array_named(name, name, type, num, perm) +#define module_param_array(name, type, nump, perm) \ + module_param_array_named(name, name, type, nump, perm) extern int param_array_set(const char *val, struct kernel_param *kp); extern int param_array_get(char *buffer, struct kernel_param *kp); diff --git a/kernel/params.c b/kernel/params.c index cfd8a8413bf6f..ebb3031cd6cc2 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -304,7 +304,7 @@ int param_array_set(const char *val, struct kernel_param *kp) struct kparam_array *arr = kp->arg; return param_array(kp->name, val, 1, arr->max, arr->elem, - arr->elemsize, arr->set, arr->num); + arr->elemsize, arr->set, arr->num ?: &arr->max); } int param_array_get(char *buffer, struct kernel_param *kp) @@ -314,7 +314,7 @@ int param_array_get(char *buffer, struct kernel_param *kp) struct kernel_param p; p = *kp; - for (i = off = 0; i < *arr->num; i++) { + for (i = off = 0; i < (arr->num ? *arr->num : arr->max); i++) { if (i) buffer[off++] = ','; p.arg = arr->elem + arr->elemsize * i; diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index a21a326808b45..2965ba95242a1 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c @@ -1484,8 +1484,7 @@ static struct rtnetlink_link dnet_rtnetlink_table[RTM_MAX-RTM_BASE+1] = }; static int __initdata addr[2]; -static int __initdata num; -module_param_array(addr, int, num, 0444); +module_param_array(addr, int, NULL, 0444); MODULE_PARM_DESC(addr, "The DECnet address of this machine: area,node"); void __init dn_dev_init(void) diff --git a/net/ipv4/ipvs/ip_vs_ftp.c b/net/ipv4/ipvs/ip_vs_ftp.c index 0165cc6e34c00..a19a33ceb8119 100644 --- a/net/ipv4/ipvs/ip_vs_ftp.c +++ b/net/ipv4/ipvs/ip_vs_ftp.c @@ -45,8 +45,7 @@ * First port is set to the default port. */ static int ports[IP_VS_APP_MAX_PORTS] = {21, 0}; -static int ports_c; -module_param_array(ports, int, ports_c, 0); +module_param_array(ports, int, NULL, 0); /* * Debug level diff --git a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c index df7008989c381..8038cadeaa94f 100644 --- a/net/ipv4/netfilter/ip_conntrack_ftp.c +++ b/net/ipv4/netfilter/ip_conntrack_ftp.c @@ -34,7 +34,7 @@ struct module *ip_conntrack_ftp = THIS_MODULE; #define MAX_PORTS 8 static int ports[MAX_PORTS]; static int ports_c; -module_param_array(ports, int, ports_c, 0400); +module_param_array(ports, int, &ports_c, 0400); static int loose; module_param(loose, int, 0600); diff --git a/net/ipv4/netfilter/ip_conntrack_irc.c b/net/ipv4/netfilter/ip_conntrack_irc.c index d007bc9950cf0..2a048b527ec5e 100644 --- a/net/ipv4/netfilter/ip_conntrack_irc.c +++ b/net/ipv4/netfilter/ip_conntrack_irc.c @@ -46,7 +46,7 @@ static DECLARE_LOCK(irc_buffer_lock); MODULE_AUTHOR("Harald Welte "); MODULE_DESCRIPTION("IRC (DCC) connection tracking helper"); MODULE_LICENSE("GPL"); -module_param_array(ports, int, ports_c, 0400); +module_param_array(ports, int, &ports_c, 0400); MODULE_PARM_DESC(ports, "port numbers of IRC servers"); module_param(max_dcc_channels, int, 0400); MODULE_PARM_DESC(max_dcc_channels, "max number of expected DCC channels per IRC session"); diff --git a/net/ipv4/netfilter/ip_conntrack_tftp.c b/net/ipv4/netfilter/ip_conntrack_tftp.c index d132a3c48d8d8..01a5e53e81bb1 100644 --- a/net/ipv4/netfilter/ip_conntrack_tftp.c +++ b/net/ipv4/netfilter/ip_conntrack_tftp.c @@ -28,7 +28,7 @@ MODULE_LICENSE("GPL"); #define MAX_PORTS 8 static int ports[MAX_PORTS]; static int ports_c; -module_param_array(ports, int, ports_c, 0400); +module_param_array(ports, int, &ports_c, 0400); MODULE_PARM_DESC(ports, "port numbers of tftp servers"); #if 0 diff --git a/net/ipv4/netfilter/ip_nat_ftp.c b/net/ipv4/netfilter/ip_nat_ftp.c index be00284f8a1d2..65da7b3367d74 100644 --- a/net/ipv4/netfilter/ip_nat_ftp.c +++ b/net/ipv4/netfilter/ip_nat_ftp.c @@ -34,7 +34,7 @@ MODULE_DESCRIPTION("ftp NAT helper"); static int ports[MAX_PORTS]; static int ports_c; -module_param_array(ports, int, ports_c, 0400); +module_param_array(ports, int, &ports_c, 0400); /* FIXME: Time out? --RR */ diff --git a/net/ipv4/netfilter/ip_nat_irc.c b/net/ipv4/netfilter/ip_nat_irc.c index 5eb60a25ac8e0..4086f95542bd9 100644 --- a/net/ipv4/netfilter/ip_nat_irc.c +++ b/net/ipv4/netfilter/ip_nat_irc.c @@ -42,7 +42,7 @@ static int ports_c; MODULE_AUTHOR("Harald Welte "); MODULE_DESCRIPTION("IRC (DCC) NAT helper"); MODULE_LICENSE("GPL"); -module_param_array(ports, int, ports_c, 0400); +module_param_array(ports, int, &ports_c, 0400); MODULE_PARM_DESC(ports, "port numbers of IRC servers"); /* FIXME: Time out? --RR */ diff --git a/net/ipv4/netfilter/ip_nat_tftp.c b/net/ipv4/netfilter/ip_nat_tftp.c index cacaab6f768c1..aedd7828c04f8 100644 --- a/net/ipv4/netfilter/ip_nat_tftp.c +++ b/net/ipv4/netfilter/ip_nat_tftp.c @@ -42,7 +42,7 @@ MODULE_LICENSE("GPL"); static int ports[MAX_PORTS]; static int ports_c = 0; -module_param_array(ports, int, ports_c, 0400); +module_param_array(ports, int, &ports_c, 0400); MODULE_PARM_DESC(ports, "port numbers of tftp servers"); #if 0 diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index cc0b6028c25c0..ed31d86095224 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c @@ -49,8 +49,7 @@ MODULE_LICENSE("GPL"); /* FIXME: so far only some PCI devices have the preallocation table */ #ifdef CONFIG_PCI static int enable[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; -static int boot_devs; -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable cards to allocate buffers."); #endif diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 5d87847c616e5..fc8736191b2db 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -47,14 +47,13 @@ static int dsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0}; static int adsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; static int nonblock_open; -static int boot_devs; MODULE_AUTHOR("Jaroslav Kysela , Abramo Bagnara "); MODULE_DESCRIPTION("PCM OSS emulation for ALSA."); MODULE_LICENSE("GPL"); -module_param_array(dsp_map, int, boot_devs, 0444); +module_param_array(dsp_map, int, NULL, 0444); MODULE_PARM_DESC(dsp_map, "PCM device number assigned to 1st OSS device."); -module_param_array(adsp_map, int, boot_devs, 0444); +module_param_array(adsp_map, int, NULL, 0444); MODULE_PARM_DESC(adsp_map, "PCM device number assigned to 2nd OSS device."); module_param(nonblock_open, bool, 0644); MODULE_PARM_DESC(nonblock_open, "Don't block opening busy PCM devices."); diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index 1c753cda66f4c..6c7609329bc0b 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c @@ -42,10 +42,9 @@ MODULE_LICENSE("GPL"); #ifdef CONFIG_SND_OSSEMUL static int midi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0}; static int amidi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; -static int boot_devs; -module_param_array(midi_map, int, boot_devs, 0444); +module_param_array(midi_map, int, NULL, 0444); MODULE_PARM_DESC(midi_map, "Raw MIDI device number assigned to 1st OSS device."); -module_param_array(amidi_map, int, boot_devs, 0444); +module_param_array(amidi_map, int, NULL, 0444); MODULE_PARM_DESC(amidi_map, "Raw MIDI device number assigned to 2nd OSS device."); #endif /* CONFIG_SND_OSSEMUL */ diff --git a/sound/core/seq/seq.c b/sound/core/seq/seq.c index f8d629362db37..fd51a3e45c419 100644 --- a/sound/core/seq/seq.c +++ b/sound/core/seq/seq.c @@ -51,8 +51,7 @@ MODULE_AUTHOR("Frank van de Pol , Jaroslav Kysela io_port + ESSIO_REG_##x) diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index e97a7e8d7a371..9a4bc82cef322 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c @@ -135,28 +135,27 @@ static int enable_mpu[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2}; #ifdef SUPPORT_JOYSTICK static int joystick[SNDRV_CARDS]; #endif -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard."); -module_param_array(total_bufsize, int, boot_devs, 0444); +module_param_array(total_bufsize, int, NULL, 0444); MODULE_PARM_DESC(total_bufsize, "Total buffer size in kB."); -module_param_array(pcm_substreams_p, int, boot_devs, 0444); +module_param_array(pcm_substreams_p, int, NULL, 0444); MODULE_PARM_DESC(pcm_substreams_p, "PCM Playback substreams for " CARD_NAME " soundcard."); -module_param_array(pcm_substreams_c, int, boot_devs, 0444); +module_param_array(pcm_substreams_c, int, NULL, 0444); MODULE_PARM_DESC(pcm_substreams_c, "PCM Capture substreams for " CARD_NAME " soundcard."); -module_param_array(clock, int, boot_devs, 0444); +module_param_array(clock, int, NULL, 0444); MODULE_PARM_DESC(clock, "Clock on " CARD_NAME " soundcard. (0 = auto-detect)"); -module_param_array(use_pm, int, boot_devs, 0444); +module_param_array(use_pm, int, NULL, 0444); MODULE_PARM_DESC(use_pm, "Toggle power-management. (0 = off, 1 = on, 2 = auto)"); -module_param_array(enable_mpu, int, boot_devs, 0444); +module_param_array(enable_mpu, int, NULL, 0444); MODULE_PARM_DESC(enable_mpu, "Enable MPU401. (0 = off, 1 = on, 2 = auto)"); #ifdef SUPPORT_JOYSTICK -module_param_array(joystick, bool, boot_devs, 0444); +module_param_array(joystick, bool, NULL, 0444); MODULE_PARM_DESC(joystick, "Enable joystick."); #endif diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 9a0e1580b58ed..2f19d7601da2e 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c @@ -57,15 +57,14 @@ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card * * High 16-bits are video (radio) device number + 1 */ static int tea575x_tuner[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for the FM801 soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for the FM801 soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable FM801 soundcard."); -module_param_array(tea575x_tuner, bool, boot_devs, 0444); +module_param_array(tea575x_tuner, bool, NULL, 0444); MODULE_PARM_DESC(tea575x_tuner, "Enable TEA575x tuner."); /* diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 194dc5431c380..b481e44397373 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c @@ -86,19 +86,18 @@ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card static char *model[SNDRV_CARDS]; static int omni[SNDRV_CARDS]; /* Delta44 & 66 Omni I/O support */ static int cs8427_timeout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 500}; /* CS8427 S/PDIF transciever reset timeout value in msec */ -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for ICE1712 soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for ICE1712 soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable ICE1712 soundcard."); -module_param_array(omni, bool, boot_devs, 0444); +module_param_array(omni, bool, NULL, 0444); MODULE_PARM_DESC(omni, "Enable Midiman M-Audio Delta Omni I/O support."); -module_param_array(cs8427_timeout, int, boot_devs, 0444); +module_param_array(cs8427_timeout, int, NULL, 0444); MODULE_PARM_DESC(cs8427_timeout, "Define reset timeout for cs8427 chip in msec resolution."); -module_param_array(model, charp, boot_devs, 0444); +module_param_array(model, charp, NULL, 0444); MODULE_PARM_DESC(model, "Use the given board model."); #ifndef PCI_VENDOR_ID_ICE diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 0fa7e8a033b03..058ee208dc2d0 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -81,26 +81,25 @@ static int joystick[SNDRV_CARDS]; #ifdef SUPPORT_MIDI static int mpu_port[SNDRV_CARDS]; /* disabled */ #endif -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for Intel i8x0 soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for Intel i8x0 soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable Intel i8x0 soundcard."); -module_param_array(ac97_clock, int, boot_devs, 0444); +module_param_array(ac97_clock, int, NULL, 0444); MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (0 = auto-detect)."); -module_param_array(ac97_quirk, int, boot_devs, 0444); +module_param_array(ac97_quirk, int, NULL, 0444); MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware."); -module_param_array(buggy_irq, bool, boot_devs, 0444); +module_param_array(buggy_irq, bool, NULL, 0444); MODULE_PARM_DESC(buggy_irq, "Enable workaround for buggy interrupts on some motherboards."); #ifdef SUPPORT_JOYSTICK -module_param_array(joystick, bool, boot_devs, 0444); +module_param_array(joystick, bool, NULL, 0444); MODULE_PARM_DESC(joystick, "Enable joystick for Intel i8x0 soundcard."); #endif #ifdef SUPPORT_MIDI -module_param_array(mpu_port, int, boot_devs, 0444); +module_param_array(mpu_port, int, NULL, 0444); MODULE_PARM_DESC(mpu_port, "MPU401 port # for Intel i8x0 driver."); #endif diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index a9b3175477d47..0cb2e40eaa743 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c @@ -55,15 +55,14 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for Intel i8x0 modemcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for Intel i8x0 modemcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable Intel i8x0 modemcard."); -module_param_array(ac97_clock, int, boot_devs, 0444); +module_param_array(ac97_clock, int, NULL, 0444); MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (0 = auto-detect)."); /* diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index c04462fd16c3b..5de1f7dca0337 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c @@ -410,13 +410,12 @@ MODULE_SUPPORTED_DEVICE("{{KORG,korg1212}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */ -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for Korg 1212 soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for Korg 1212 soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable Korg 1212 soundcard."); MODULE_AUTHOR("Haroldo Gamal "); diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index 8cf0e185df73c..4b3d2b4c0e2bb 100644 --- a/sound/pci/maestro3.c +++ b/sound/pci/maestro3.c @@ -62,17 +62,16 @@ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* all enabled */ static int external_amp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; static int amp_gpio[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1}; -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable this soundcard."); -module_param_array(external_amp, bool, boot_devs, 0444); +module_param_array(external_amp, bool, NULL, 0444); MODULE_PARM_DESC(external_amp, "Enable external amp for " CARD_NAME " soundcard."); -module_param_array(amp_gpio, int, boot_devs, 0444); +module_param_array(amp_gpio, int, NULL, 0444); MODULE_PARM_DESC(amp_gpio, "GPIO pin number for external amp. (default = -1)"); #define MAX_PLAYBACKS 2 diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 9dff42a198673..0b773012bbc09 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c @@ -47,13 +47,12 @@ MODULE_SUPPORTED_DEVICE("{{Digigram," CARD_NAME "}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for Digigram " CARD_NAME " soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for Digigram " CARD_NAME " soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable Digigram " CARD_NAME " soundcard."); /* diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index e65e7de31f263..578b7f1acf9d6 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c @@ -61,25 +61,24 @@ static int force_ac97[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* disable static int buffer_top[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* not specified */ static int use_cache[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* disabled */ static int vaio_hack[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* disabled */ -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable this soundcard."); -module_param_array(playback_bufsize, int, boot_devs, 0444); +module_param_array(playback_bufsize, int, NULL, 0444); MODULE_PARM_DESC(playback_bufsize, "DAC frame size in kB for " CARD_NAME " soundcard."); -module_param_array(capture_bufsize, int, boot_devs, 0444); +module_param_array(capture_bufsize, int, NULL, 0444); MODULE_PARM_DESC(capture_bufsize, "ADC frame size in kB for " CARD_NAME " soundcard."); -module_param_array(force_ac97, bool, boot_devs, 0444); +module_param_array(force_ac97, bool, NULL, 0444); MODULE_PARM_DESC(force_ac97, "Force to use AC97 codec for " CARD_NAME " soundcard."); -module_param_array(buffer_top, int, boot_devs, 0444); +module_param_array(buffer_top, int, NULL, 0444); MODULE_PARM_DESC(buffer_top, "Set the top address of audio buffer for " CARD_NAME " soundcard."); -module_param_array(use_cache, bool, boot_devs, 0444); +module_param_array(use_cache, bool, NULL, 0444); MODULE_PARM_DESC(use_cache, "Enable the cache for coefficient table access."); -module_param_array(vaio_hack, bool, boot_devs, 0444); +module_param_array(vaio_hack, bool, NULL, 0444); MODULE_PARM_DESC(vaio_hack, "Enable workaround for Sony VAIO notebooks."); /* diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index ddc8695cbb74e..583f4452edb5a 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c @@ -92,15 +92,14 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ static int fullduplex[SNDRV_CARDS]; // = {[0 ... (SNDRV_CARDS - 1)] = 1}; -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for RME Digi32 soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for RME Digi32 soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable RME Digi32 soundcard."); -module_param_array(fullduplex, bool, boot_devs, 0444); +module_param_array(fullduplex, bool, NULL, 0444); MODULE_PARM_DESC(fullduplex, "Support full-duplex mode."); MODULE_AUTHOR("Martin Langer , Pilo Chambert "); MODULE_DESCRIPTION("RME Digi32, Digi32/8, Digi32 PRO"); diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index a2c59b9481888..56d47fd411cb0 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c @@ -48,17 +48,16 @@ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ static int precise_ptr[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* Enable precise pointer */ static int line_outs_monitor[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0}; /* Send all inputs/playback to line outs */ -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for RME Hammerfall DSP interface."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for RME Hammerfall DSP interface."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable/disable specific Hammerfall DSP soundcards."); -module_param_array(precise_ptr, bool, boot_devs, 0444); +module_param_array(precise_ptr, bool, NULL, 0444); MODULE_PARM_DESC(precise_ptr, "Enable precise pointer (doesn't work reliably)."); -module_param_array(line_outs_monitor, bool, boot_devs, 0444); +module_param_array(line_outs_monitor, bool, NULL, 0444); MODULE_PARM_DESC(line_outs_monitor, "Send all input and playback streams to line outs by default."); MODULE_AUTHOR("Paul Davis , Marcus Andersson, Thomas Charbonnel "); MODULE_DESCRIPTION("RME Hammerfall DSP"); diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index c6cbccce44301..3a34039dc286b 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c @@ -42,15 +42,14 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ static int precise_ptr[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* Enable precise pointer */ -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for RME Digi9652 (Hammerfall) soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for RME Digi9652 (Hammerfall) soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable/disable specific RME96{52,36} soundcards."); -module_param_array(precise_ptr, bool, boot_devs, 0444); +module_param_array(precise_ptr, bool, NULL, 0444); MODULE_PARM_DESC(precise_ptr, "Enable precise pointer (doesn't work reliably)."); MODULE_AUTHOR("Paul Davis , Winfried Ritsch"); MODULE_DESCRIPTION("RME Digi9652/Digi9636"); diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index bb6802714fce3..54e6c20d3f3b2 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c @@ -59,17 +59,16 @@ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card * static int reverb[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; static int mge[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; static unsigned int dmaio = 0x7a00; /* DDMA i/o address */ -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for S3 SonicVibes soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for S3 SonicVibes soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable S3 SonicVibes soundcard."); -module_param_array(reverb, bool, boot_devs, 0444); +module_param_array(reverb, bool, NULL, 0444); MODULE_PARM_DESC(reverb, "Enable reverb (SRAM is present) for S3 SonicVibes soundcard."); -module_param_array(mge, bool, boot_devs, 0444); +module_param_array(mge, bool, NULL, 0444); MODULE_PARM_DESC(mge, "MIC Gain Enable for S3 SonicVibes soundcard."); module_param(dmaio, uint, 0444); MODULE_PARM_DESC(dmaio, "DDMA i/o base address for S3 SonicVibes soundcard."); diff --git a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c index f68d3a3728aa4..8304190f855cf 100644 --- a/sound/pci/trident/trident.c +++ b/sound/pci/trident/trident.c @@ -51,17 +51,16 @@ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 32}; static int wavetable_size[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 8192}; -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for Trident 4DWave PCI soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for Trident 4DWave PCI soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable Trident 4DWave PCI soundcard."); -module_param_array(pcm_channels, int, boot_devs, 0444); +module_param_array(pcm_channels, int, NULL, 0444); MODULE_PARM_DESC(pcm_channels, "Number of hardware channels assigned for PCM."); -module_param_array(wavetable_size, int, boot_devs, 0444); +module_param_array(wavetable_size, int, NULL, 0444); MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); static struct pci_device_id snd_trident_ids[] = { diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index fb549ea9eec9e..1599be5598e59 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c @@ -83,25 +83,24 @@ static int joystick[SNDRV_CARDS]; static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000}; static int ac97_quirk[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = AC97_TUNE_DEFAULT}; static int dxs_support[SNDRV_CARDS]; -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for VIA 82xx bridge."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable audio part of VIA 82xx bridge."); -module_param_array(mpu_port, long, boot_devs, 0444); +module_param_array(mpu_port, long, NULL, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 port. (VT82C686x only)"); #ifdef SUPPORT_JOYSTICK -module_param_array(joystick, bool, boot_devs, 0444); +module_param_array(joystick, bool, NULL, 0444); MODULE_PARM_DESC(joystick, "Enable joystick. (VT82C686x only)"); #endif -module_param_array(ac97_clock, int, boot_devs, 0444); +module_param_array(ac97_clock, int, NULL, 0444); MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz)."); -module_param_array(ac97_quirk, int, boot_devs, 0444); +module_param_array(ac97_quirk, int, NULL, 0444); MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware."); -module_param_array(dxs_support, int, boot_devs, 0444); +module_param_array(dxs_support, int, NULL, 0444); MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA)"); diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index 4dd658d42e997..e4e64a88a52fb 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c @@ -40,17 +40,16 @@ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ static int mic[SNDRV_CARDS]; /* microphone */ static int ibl[SNDRV_CARDS]; /* microphone */ -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for Digigram " CARD_NAME " soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for Digigram " CARD_NAME " soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable Digigram " CARD_NAME " soundcard."); -module_param_array(mic, bool, boot_devs, 0444); +module_param_array(mic, bool, NULL, 0444); MODULE_PARM_DESC(mic, "Enable Microphone."); -module_param_array(ibl, int, boot_devs, 0444); +module_param_array(ibl, int, NULL, 0444); MODULE_PARM_DESC(ibl, "Capture IBL size."); /* diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c index 4440e1df6b260..a4afa4b694e1c 100644 --- a/sound/pci/ymfpci/ymfpci.c +++ b/sound/pci/ymfpci/ymfpci.c @@ -49,23 +49,22 @@ static long mpu_port[SNDRV_CARDS]; static long joystick_port[SNDRV_CARDS]; #endif static int rear_switch[SNDRV_CARDS]; -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for the Yamaha DS-XG PCI soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for the Yamaha DS-XG PCI soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable Yamaha DS-XG soundcard."); -module_param_array(mpu_port, long, boot_devs, 0444); +module_param_array(mpu_port, long, NULL, 0444); MODULE_PARM_DESC(mpu_port, "MPU-401 Port."); -module_param_array(fm_port, long, boot_devs, 0444); +module_param_array(fm_port, long, NULL, 0444); MODULE_PARM_DESC(fm_port, "FM OPL-3 Port."); #ifdef SUPPORT_JOYSTICK -module_param_array(joystick_port, long, boot_devs, 0444); +module_param_array(joystick_port, long, NULL, 0444); MODULE_PARM_DESC(joystick_port, "Joystick port address"); #endif -module_param_array(rear_switch, bool, boot_devs, 0444); +module_param_array(rear_switch, bool, NULL, 0444); MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch"); static struct pci_device_id snd_ymfpci_ids[] = { diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index 1eb9e54fe1d31..0434acf1f75ac 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c @@ -44,17 +44,16 @@ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable switches */ static unsigned int irq_mask = 0xffff; static int irq_list[4] = { -1 }; -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard."); module_param(irq_mask, int, 0444); MODULE_PARM_DESC(irq_mask, "IRQ bitmask for " CARD_NAME " soundcard."); -module_param_array(irq_list, int, boot_devs, 0444); +module_param_array(irq_list, int, NULL, 0444); MODULE_PARM_DESC(irq_list, "List of Available interrupts for " CARD_NAME " soundcard."); diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index 27608e4c6958a..63aebb2b07f2f 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c @@ -58,19 +58,18 @@ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable switches */ static unsigned int irq_mask = 0xffff; static int irq_list[4] = { -1 }; static int ibl[SNDRV_CARDS]; -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for " CARD_NAME " soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard."); module_param(irq_mask, int, 0444); MODULE_PARM_DESC(irq_mask, "IRQ bitmask for " CARD_NAME " soundcard."); -module_param_array(irq_list, int, boot_devs, 0444); +module_param_array(irq_list, int, NULL, 0444); MODULE_PARM_DESC(irq_list, "List of Available interrupts for " CARD_NAME " soundcard."); -module_param_array(ibl, int, boot_devs, 0444); +module_param_array(ibl, int, NULL, 0444); MODULE_PARM_DESC(ibl, "Capture IBL size for " CARD_NAME " soundcard."); diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c index aa14c340dadd7..bd8a850e93eaa 100644 --- a/sound/sparc/amd7930.c +++ b/sound/sparc/amd7930.c @@ -50,13 +50,12 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for Sun AMD7930 soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for Sun AMD7930 soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable Sun AMD7930 soundcard."); MODULE_AUTHOR("Thomas K. Dyas and David S. Miller"); MODULE_DESCRIPTION("Sun AMD7930"); diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index f084dc1211a8f..9806b60367bb2 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c @@ -49,13 +49,12 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for Sun CS4231 soundcard."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for Sun CS4231 soundcard."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable Sun CS4231 soundcard."); MODULE_AUTHOR("Jaroslav Kysela, Derrick J. Brashear and David S. Miller"); MODULE_DESCRIPTION("Sun CS4231"); diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 1f3548c5d9b19..94a84b6434688 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -68,17 +68,16 @@ static int vid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 }; /* Vendor ID for static int pid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 }; /* Product ID for this card */ static int nrpacks = 4; /* max. number of packets per urb */ static int async_unlink = 1; -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for the USB audio adapter."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for the USB audio adapter."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable USB audio adapter."); -module_param_array(vid, int, boot_devs, 0444); +module_param_array(vid, int, NULL, 0444); MODULE_PARM_DESC(vid, "Vendor ID for the USB audio device."); -module_param_array(pid, int, boot_devs, 0444); +module_param_array(pid, int, NULL, 0444); MODULE_PARM_DESC(pid, "Product ID for the USB audio device."); module_param(nrpacks, int, 0444); MODULE_PARM_DESC(nrpacks, "Max. number of packets per URB."); diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c index 44a73816ff190..269d7fd9e5608 100644 --- a/sound/usb/usx2y/usbusx2y.c +++ b/sound/usb/usx2y/usbusx2y.c @@ -122,13 +122,12 @@ MODULE_SUPPORTED_DEVICE("{{TASCAM(0x1604), "NAME_ALLCAPS"(0x8001)(0x8005)(0x8007 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-max */ static char* id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* Id for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ -static int boot_devs; -module_param_array(index, int, boot_devs, 0444); +module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for "NAME_ALLCAPS"."); -module_param_array(id, charp, boot_devs, 0444); +module_param_array(id, charp, NULL, 0444); MODULE_PARM_DESC(id, "ID string for "NAME_ALLCAPS"."); -module_param_array(enable, bool, boot_devs, 0444); +module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable "NAME_ALLCAPS"."); -- 2.53.0