diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2006-03-25 06:07:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 11:22:52 -0500 |
commit | 8d3b33f67fdc0fb364a1ef6d8fbbea7c2e4e6c98 (patch) | |
tree | 7fc48e7544ea6a6c6a7cc7685612a38f5edc25ae | |
parent | c721bccece2b3abca4f7b0b95108e68b78445cec (diff) |
[PATCH] Remove MODULE_PARM
MODULE_PARM was actually breaking: recent gcc version optimize them out as
unused. It's time to replace the last users, which are generally in the
most unloved drivers anyway.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
56 files changed, 146 insertions, 329 deletions
diff --git a/Documentation/networking/ray_cs.txt b/Documentation/networking/ray_cs.txt index 5427f8c7df95..145d27a52395 100644 --- a/Documentation/networking/ray_cs.txt +++ b/Documentation/networking/ray_cs.txt | |||
@@ -25,7 +25,7 @@ the essid= string parameter is available via the kernel command line. | |||
25 | This will change after the method of sorting out parameters for all | 25 | This will change after the method of sorting out parameters for all |
26 | the PCMCIA drivers is agreed upon. If you must have a built in driver | 26 | the PCMCIA drivers is agreed upon. If you must have a built in driver |
27 | with nondefault parameters, they can be edited in | 27 | with nondefault parameters, they can be edited in |
28 | /usr/src/linux/drivers/net/pcmcia/ray_cs.c. Searching for MODULE_PARM | 28 | /usr/src/linux/drivers/net/pcmcia/ray_cs.c. Searching for module_param |
29 | will find them all. | 29 | will find them all. |
30 | 30 | ||
31 | Information on card services is available at: | 31 | Information on card services is available at: |
diff --git a/Documentation/sound/oss/Introduction b/Documentation/sound/oss/Introduction index 15d4fb975ac0..f04ba6bb7395 100644 --- a/Documentation/sound/oss/Introduction +++ b/Documentation/sound/oss/Introduction | |||
@@ -69,7 +69,7 @@ are available, for example IRQ, address, DMA. | |||
69 | 69 | ||
70 | Warning, the options for different cards sometime use different names | 70 | Warning, the options for different cards sometime use different names |
71 | for the same or a similar feature (dma1= versus dma16=). As a last | 71 | for the same or a similar feature (dma1= versus dma16=). As a last |
72 | resort, inspect the code (search for MODULE_PARM). | 72 | resort, inspect the code (search for module_param). |
73 | 73 | ||
74 | Notes: | 74 | Notes: |
75 | 75 | ||
diff --git a/Documentation/sound/oss/cs46xx b/Documentation/sound/oss/cs46xx index 88d6cf8b39f3..b54432709863 100644 --- a/Documentation/sound/oss/cs46xx +++ b/Documentation/sound/oss/cs46xx | |||
@@ -88,7 +88,7 @@ parameters. for a copy email: twoller@crystal.cirrus.com | |||
88 | 88 | ||
89 | MODULE_PARMS definitions | 89 | MODULE_PARMS definitions |
90 | ------------------------ | 90 | ------------------------ |
91 | MODULE_PARM(defaultorder, "i"); | 91 | module_param(defaultorder, ulong, 0); |
92 | defaultorder=N | 92 | defaultorder=N |
93 | where N is a value from 1 to 12 | 93 | where N is a value from 1 to 12 |
94 | The buffer order determines the size of the dma buffer for the driver. | 94 | The buffer order determines the size of the dma buffer for the driver. |
@@ -98,18 +98,18 @@ to not underrun the dma buffer as easily. As default, use 32k (order=3) | |||
98 | rather than 64k as some of the games work more responsively. | 98 | rather than 64k as some of the games work more responsively. |
99 | (2^N) * PAGE_SIZE = allocated buffer size | 99 | (2^N) * PAGE_SIZE = allocated buffer size |
100 | 100 | ||
101 | MODULE_PARM(cs_debuglevel, "i"); | 101 | module_param(cs_debuglevel, ulong, 0644); |
102 | MODULE_PARM(cs_debugmask, "i"); | 102 | module_param(cs_debugmask, ulong, 0644); |
103 | cs_debuglevel=N | 103 | cs_debuglevel=N |
104 | cs_debugmask=0xMMMMMMMM | 104 | cs_debugmask=0xMMMMMMMM |
105 | where N is a value from 0 (no debug printfs), to 9 (maximum) | 105 | where N is a value from 0 (no debug printfs), to 9 (maximum) |
106 | 0xMMMMMMMM is a debug mask corresponding to the CS_xxx bits (see driver source). | 106 | 0xMMMMMMMM is a debug mask corresponding to the CS_xxx bits (see driver source). |
107 | 107 | ||
108 | MODULE_PARM(hercules_egpio_disable, "i"); | 108 | module_param(hercules_egpio_disable, ulong, 0); |
109 | hercules_egpio_disable=N | 109 | hercules_egpio_disable=N |
110 | where N is a 0 (enable egpio), or a 1 (disable egpio support) | 110 | where N is a 0 (enable egpio), or a 1 (disable egpio support) |
111 | 111 | ||
112 | MODULE_PARM(initdelay, "i"); | 112 | module_param(initdelay, ulong, 0); |
113 | initdelay=N | 113 | initdelay=N |
114 | This value is used to determine the millescond delay during the initialization | 114 | This value is used to determine the millescond delay during the initialization |
115 | code prior to powering up the PLL. On laptops this value can be used to | 115 | code prior to powering up the PLL. On laptops this value can be used to |
@@ -118,19 +118,19 @@ system is booted under battery power then the mdelay()/udelay() functions fail t | |||
118 | properly delay the required time. Also, if the system is booted under AC power | 118 | properly delay the required time. Also, if the system is booted under AC power |
119 | and then the power removed, the mdelay()/udelay() functions will not delay properly. | 119 | and then the power removed, the mdelay()/udelay() functions will not delay properly. |
120 | 120 | ||
121 | MODULE_PARM(powerdown, "i"); | 121 | module_param(powerdown, ulong, 0); |
122 | powerdown=N | 122 | powerdown=N |
123 | where N is 0 (disable any powerdown of the internal blocks) or 1 (enable powerdown) | 123 | where N is 0 (disable any powerdown of the internal blocks) or 1 (enable powerdown) |
124 | 124 | ||
125 | 125 | ||
126 | MODULE_PARM(external_amp, "i"); | 126 | module_param(external_amp, bool, 0); |
127 | external_amp=1 | 127 | external_amp=1 |
128 | if N is set to 1, then force enabling the EAPD support in the primary AC97 codec. | 128 | if N is set to 1, then force enabling the EAPD support in the primary AC97 codec. |
129 | override the detection logic and force the external amp bit in the AC97 0x26 register | 129 | override the detection logic and force the external amp bit in the AC97 0x26 register |
130 | to be reset (0). EAPD should be 0 for powerup, and 1 for powerdown. The VTB Santa Cruz | 130 | to be reset (0). EAPD should be 0 for powerup, and 1 for powerdown. The VTB Santa Cruz |
131 | card has inverted logic, so there is a special function for these cards. | 131 | card has inverted logic, so there is a special function for these cards. |
132 | 132 | ||
133 | MODULE_PARM(thinkpad, "i"); | 133 | module_param(thinkpad, bool, 0); |
134 | thinkpad=1 | 134 | thinkpad=1 |
135 | if N is set to 1, then force enabling the clkrun functionality. | 135 | if N is set to 1, then force enabling the clkrun functionality. |
136 | Currently, when the part is being used, then clkrun is disabled for the entire system, | 136 | Currently, when the part is being used, then clkrun is disabled for the entire system, |
diff --git a/arch/ppc/8xx_io/cs4218_tdm.c b/arch/ppc/8xx_io/cs4218_tdm.c index 49eb2a7e65c0..a892356d5c3b 100644 --- a/arch/ppc/8xx_io/cs4218_tdm.c +++ b/arch/ppc/8xx_io/cs4218_tdm.c | |||
@@ -126,11 +126,11 @@ static int numReadBufs = 4, readbufSize = 32; | |||
126 | */ | 126 | */ |
127 | static volatile cbd_t *rx_base, *rx_cur, *tx_base, *tx_cur; | 127 | static volatile cbd_t *rx_base, *rx_cur, *tx_base, *tx_cur; |
128 | 128 | ||
129 | MODULE_PARM(catchRadius, "i"); | 129 | module_param(catchRadius, int, 0); |
130 | MODULE_PARM(numBufs, "i"); | 130 | module_param(numBufs, int, 0); |
131 | MODULE_PARM(bufSize, "i"); | 131 | module_param(bufSize, int, 0); |
132 | MODULE_PARM(numreadBufs, "i"); | 132 | module_param(numreadBufs, int, 0); |
133 | MODULE_PARM(readbufSize, "i"); | 133 | module_param(readbufSize, int, 0); |
134 | 134 | ||
135 | #define arraysize(x) (sizeof(x)/sizeof(*(x))) | 135 | #define arraysize(x) (sizeof(x)/sizeof(*(x))) |
136 | #define le2be16(x) (((x)<<8 & 0xff00) | ((x)>>8 & 0x00ff)) | 136 | #define le2be16(x) (((x)<<8 & 0xff00) | ((x)>>8 & 0x00ff)) |
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index f8ce235ccfc3..c39650920bdf 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c | |||
@@ -271,7 +271,7 @@ unsigned char *DMABuffer; /* buffer for writes */ | |||
271 | static unsigned long PhysDMABuffer; /* physical address */ | 271 | static unsigned long PhysDMABuffer; /* physical address */ |
272 | 272 | ||
273 | static int UseTrackbuffer = -1; /* Do track buffering? */ | 273 | static int UseTrackbuffer = -1; /* Do track buffering? */ |
274 | MODULE_PARM(UseTrackbuffer, "i"); | 274 | module_param(UseTrackbuffer, int, 0); |
275 | 275 | ||
276 | unsigned char *TrackBuffer; /* buffer for reads */ | 276 | unsigned char *TrackBuffer; /* buffer for reads */ |
277 | static unsigned long PhysTrackBuffer; /* physical address */ | 277 | static unsigned long PhysTrackBuffer; /* physical address */ |
@@ -296,7 +296,7 @@ static int MotorOn = 0, MotorOffTrys; | |||
296 | static int IsFormatting = 0, FormatError; | 296 | static int IsFormatting = 0, FormatError; |
297 | 297 | ||
298 | static int UserSteprate[FD_MAX_UNITS] = { -1, -1 }; | 298 | static int UserSteprate[FD_MAX_UNITS] = { -1, -1 }; |
299 | MODULE_PARM(UserSteprate, "1-" __MODULE_STRING(FD_MAX_UNITS) "i"); | 299 | module_param_array(UserSteprate, int, NULL, 0); |
300 | 300 | ||
301 | /* Synchronization of FDC access. */ | 301 | /* Synchronization of FDC access. */ |
302 | static volatile int fdc_busy = 0; | 302 | static volatile int fdc_busy = 0; |
diff --git a/drivers/cdrom/cm206.c b/drivers/cdrom/cm206.c index fad27a87ce35..f43a988dd413 100644 --- a/drivers/cdrom/cm206.c +++ b/drivers/cdrom/cm206.c | |||
@@ -218,12 +218,12 @@ static int cm206_base = CM206_BASE; | |||
218 | static int cm206_irq = CM206_IRQ; | 218 | static int cm206_irq = CM206_IRQ; |
219 | #ifdef MODULE | 219 | #ifdef MODULE |
220 | static int cm206[2] = { 0, 0 }; /* for compatible `insmod' parameter passing */ | 220 | static int cm206[2] = { 0, 0 }; /* for compatible `insmod' parameter passing */ |
221 | module_param_array(cm206, int, NULL, 0); /* base,irq or irq,base */ | ||
221 | #endif | 222 | #endif |
222 | 223 | ||
223 | MODULE_PARM(cm206_base, "i"); /* base */ | 224 | module_param(cm206_base, int, 0); /* base */ |
224 | MODULE_PARM(cm206_irq, "i"); /* irq */ | 225 | module_param(cm206_irq, int, 0); /* irq */ |
225 | MODULE_PARM(cm206, "1-2i"); /* base,irq or irq,base */ | 226 | module_param(auto_probe, bool, 0); /* auto probe base and irq */ |
226 | MODULE_PARM(auto_probe, "i"); /* auto probe base and irq */ | ||
227 | MODULE_LICENSE("GPL"); | 227 | MODULE_LICENSE("GPL"); |
228 | 228 | ||
229 | #define POLLOOP 100 /* milliseconds */ | 229 | #define POLLOOP 100 /* milliseconds */ |
diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c index 4760f515f591..05c9e865ecaf 100644 --- a/drivers/cdrom/sbpcd.c +++ b/drivers/cdrom/sbpcd.c | |||
@@ -464,8 +464,13 @@ static int sbpcd[] = | |||
464 | static __cacheline_aligned DEFINE_SPINLOCK(sbpcd_lock); | 464 | static __cacheline_aligned DEFINE_SPINLOCK(sbpcd_lock); |
465 | static struct request_queue *sbpcd_queue; | 465 | static struct request_queue *sbpcd_queue; |
466 | 466 | ||
467 | MODULE_PARM(sbpcd, "2i"); | 467 | /* You can only set the first pair, from old MODULE_PARM code. */ |
468 | MODULE_PARM(max_drives, "i"); | 468 | static int sbpcd_set(const char *val, struct kernel_param *kp) |
469 | { | ||
470 | get_options((char *)val, 2, (int *)sbpcd); | ||
471 | return 0; | ||
472 | } | ||
473 | module_param_call(sbpcd, sbpcd_set, NULL, NULL, 0); | ||
469 | 474 | ||
470 | #define NUM_PROBE (sizeof(sbpcd) / sizeof(int)) | 475 | #define NUM_PROBE (sizeof(sbpcd) / sizeof(int)) |
471 | 476 | ||
@@ -553,6 +558,7 @@ static unsigned char msgnum; | |||
553 | static char msgbuf[80]; | 558 | static char msgbuf[80]; |
554 | 559 | ||
555 | static int max_drives = MAX_DRIVES; | 560 | static int max_drives = MAX_DRIVES; |
561 | module_param(max_drives, int, 0); | ||
556 | #ifndef MODULE | 562 | #ifndef MODULE |
557 | static unsigned char setup_done; | 563 | static unsigned char setup_done; |
558 | static const char *str_sb_l = "soundblaster"; | 564 | static const char *str_sb_l = "soundblaster"; |
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index ede128356af2..e5247f85a446 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c | |||
@@ -378,13 +378,13 @@ MODULE_DESCRIPTION("Stallion Intelligent Multiport Serial Driver"); | |||
378 | MODULE_LICENSE("GPL"); | 378 | MODULE_LICENSE("GPL"); |
379 | 379 | ||
380 | 380 | ||
381 | MODULE_PARM(board0, "1-3s"); | 381 | module_param_array(board0, charp, NULL, 0); |
382 | MODULE_PARM_DESC(board0, "Board 0 config -> name[,ioaddr[,memaddr]"); | 382 | MODULE_PARM_DESC(board0, "Board 0 config -> name[,ioaddr[,memaddr]"); |
383 | MODULE_PARM(board1, "1-3s"); | 383 | module_param_array(board1, charp, NULL, 0); |
384 | MODULE_PARM_DESC(board1, "Board 1 config -> name[,ioaddr[,memaddr]"); | 384 | MODULE_PARM_DESC(board1, "Board 1 config -> name[,ioaddr[,memaddr]"); |
385 | MODULE_PARM(board2, "1-3s"); | 385 | module_param_array(board2, charp, NULL, 0); |
386 | MODULE_PARM_DESC(board2, "Board 2 config -> name[,ioaddr[,memaddr]"); | 386 | MODULE_PARM_DESC(board2, "Board 2 config -> name[,ioaddr[,memaddr]"); |
387 | MODULE_PARM(board3, "1-3s"); | 387 | module_param_array(board3, charp, NULL, 0); |
388 | MODULE_PARM_DESC(board3, "Board 3 config -> name[,ioaddr[,memaddr]"); | 388 | MODULE_PARM_DESC(board3, "Board 3 config -> name[,ioaddr[,memaddr]"); |
389 | 389 | ||
390 | #endif | 390 | #endif |
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index ea725a9964e2..0fb2fb9fb024 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -243,10 +243,10 @@ static int verbose = 0; | |||
243 | 243 | ||
244 | MODULE_AUTHOR("Casper Yang"); | 244 | MODULE_AUTHOR("Casper Yang"); |
245 | MODULE_DESCRIPTION("MOXA Smartio/Industio Family Multiport Board Device Driver"); | 245 | MODULE_DESCRIPTION("MOXA Smartio/Industio Family Multiport Board Device Driver"); |
246 | MODULE_PARM(ioaddr, "1-4i"); | 246 | module_param_array(ioaddr, int, NULL, 0); |
247 | MODULE_PARM(ttymajor, "i"); | 247 | module_param(ttymajor, int, 0); |
248 | MODULE_PARM(calloutmajor, "i"); | 248 | module_param(calloutmajor, int, 0); |
249 | MODULE_PARM(verbose, "i"); | 249 | module_param(verbose, bool, 0); |
250 | MODULE_LICENSE("GPL"); | 250 | MODULE_LICENSE("GPL"); |
251 | 251 | ||
252 | struct mxser_log { | 252 | struct mxser_log { |
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index 119e629656b7..657c0d88f48c 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c | |||
@@ -1743,10 +1743,10 @@ static int iobase; | |||
1743 | static int iobase1; | 1743 | static int iobase1; |
1744 | static int iobase2; | 1744 | static int iobase2; |
1745 | static int iobase3; | 1745 | static int iobase3; |
1746 | MODULE_PARM(iobase, "i"); | 1746 | module_param(iobase, int, 0); |
1747 | MODULE_PARM(iobase1, "i"); | 1747 | module_param(iobase1, int, 0); |
1748 | MODULE_PARM(iobase2, "i"); | 1748 | module_param(iobase2, int, 0); |
1749 | MODULE_PARM(iobase3, "i"); | 1749 | module_param(iobase3, int, 0); |
1750 | 1750 | ||
1751 | MODULE_LICENSE("GPL"); | 1751 | MODULE_LICENSE("GPL"); |
1752 | #endif /* MODULE */ | 1752 | #endif /* MODULE */ |
diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c index 91dd0551fc7c..4d64e5cbcdbf 100644 --- a/drivers/isdn/hardware/avm/b1dma.c +++ b/drivers/isdn/hardware/avm/b1dma.c | |||
@@ -39,7 +39,7 @@ MODULE_AUTHOR("Carsten Paeth"); | |||
39 | MODULE_LICENSE("GPL"); | 39 | MODULE_LICENSE("GPL"); |
40 | 40 | ||
41 | static int suppress_pollack = 0; | 41 | static int suppress_pollack = 0; |
42 | MODULE_PARM(suppress_pollack, "0-1i"); | 42 | module_param(suppress_pollack, bool, 0); |
43 | 43 | ||
44 | /* ------------------------------------------------------------- */ | 44 | /* ------------------------------------------------------------- */ |
45 | 45 | ||
diff --git a/drivers/isdn/hardware/avm/b1isa.c b/drivers/isdn/hardware/avm/b1isa.c index 38bd4dfecbd1..80fb488848b8 100644 --- a/drivers/isdn/hardware/avm/b1isa.c +++ b/drivers/isdn/hardware/avm/b1isa.c | |||
@@ -169,8 +169,8 @@ static struct pci_dev isa_dev[MAX_CARDS]; | |||
169 | static int io[MAX_CARDS]; | 169 | static int io[MAX_CARDS]; |
170 | static int irq[MAX_CARDS]; | 170 | static int irq[MAX_CARDS]; |
171 | 171 | ||
172 | MODULE_PARM(io, "1-" __MODULE_STRING(MAX_CARDS) "i"); | 172 | module_param_array(io, int, NULL, 0); |
173 | MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_CARDS) "i"); | 173 | module_param_array(irq, int, NULL, 0); |
174 | MODULE_PARM_DESC(io, "I/O base address(es)"); | 174 | MODULE_PARM_DESC(io, "I/O base address(es)"); |
175 | MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)"); | 175 | MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)"); |
176 | 176 | ||
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c index 724aac2c1cca..f7253b2136ea 100644 --- a/drivers/isdn/hardware/avm/c4.c +++ b/drivers/isdn/hardware/avm/c4.c | |||
@@ -50,7 +50,7 @@ MODULE_DEVICE_TABLE(pci, c4_pci_tbl); | |||
50 | MODULE_DESCRIPTION("CAPI4Linux: Driver for AVM C2/C4 cards"); | 50 | MODULE_DESCRIPTION("CAPI4Linux: Driver for AVM C2/C4 cards"); |
51 | MODULE_AUTHOR("Carsten Paeth"); | 51 | MODULE_AUTHOR("Carsten Paeth"); |
52 | MODULE_LICENSE("GPL"); | 52 | MODULE_LICENSE("GPL"); |
53 | MODULE_PARM(suppress_pollack, "0-1i"); | 53 | module_param(suppress_pollack, bool, 0); |
54 | 54 | ||
55 | /* ------------------------------------------------------------- */ | 55 | /* ------------------------------------------------------------- */ |
56 | 56 | ||
diff --git a/drivers/isdn/hardware/avm/t1isa.c b/drivers/isdn/hardware/avm/t1isa.c index 3b701d97bdf1..5a2f854d55b5 100644 --- a/drivers/isdn/hardware/avm/t1isa.c +++ b/drivers/isdn/hardware/avm/t1isa.c | |||
@@ -519,9 +519,9 @@ static int io[MAX_CARDS]; | |||
519 | static int irq[MAX_CARDS]; | 519 | static int irq[MAX_CARDS]; |
520 | static int cardnr[MAX_CARDS]; | 520 | static int cardnr[MAX_CARDS]; |
521 | 521 | ||
522 | MODULE_PARM(io, "1-" __MODULE_STRING(MAX_CARDS) "i"); | 522 | module_param_array(io, int, NULL, 0); |
523 | MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_CARDS) "i"); | 523 | module_param_array(irq, int, NULL, 0); |
524 | MODULE_PARM(cardnr, "1-" __MODULE_STRING(MAX_CARDS) "i"); | 524 | module_param_array(cardnr, int, NULL, 0); |
525 | MODULE_PARM_DESC(io, "I/O base address(es)"); | 525 | MODULE_PARM_DESC(io, "I/O base address(es)"); |
526 | MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)"); | 526 | MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)"); |
527 | MODULE_PARM_DESC(cardnr, "Card number(s) (as jumpered)"); | 527 | MODULE_PARM_DESC(cardnr, "Card number(s) (as jumpered)"); |
diff --git a/drivers/isdn/hysdn/hycapi.c b/drivers/isdn/hysdn/hycapi.c index 55fbea0b6ac8..6bac43cc91bd 100644 --- a/drivers/isdn/hysdn/hycapi.c +++ b/drivers/isdn/hysdn/hycapi.c | |||
@@ -31,7 +31,7 @@ | |||
31 | static char hycapi_revision[]="$Revision: 1.8.6.4 $"; | 31 | static char hycapi_revision[]="$Revision: 1.8.6.4 $"; |
32 | 32 | ||
33 | unsigned int hycapi_enable = 0xffffffff; | 33 | unsigned int hycapi_enable = 0xffffffff; |
34 | MODULE_PARM(hycapi_enable, "i"); | 34 | module_param(hycapi_enable, uint, 0); |
35 | 35 | ||
36 | typedef struct _hycapi_appl { | 36 | typedef struct _hycapi_appl { |
37 | unsigned int ctrl_mask; | 37 | unsigned int ctrl_mask; |
diff --git a/drivers/isdn/hysdn/hysdn_net.c b/drivers/isdn/hysdn/hysdn_net.c index 683647b1f2bc..d205249a1242 100644 --- a/drivers/isdn/hysdn/hysdn_net.c +++ b/drivers/isdn/hysdn/hysdn_net.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "hysdn_defs.h" | 24 | #include "hysdn_defs.h" |
25 | 25 | ||
26 | unsigned int hynet_enable = 0xffffffff; | 26 | unsigned int hynet_enable = 0xffffffff; |
27 | MODULE_PARM(hynet_enable, "i"); | 27 | module_param(hynet_enable, uint, 0); |
28 | 28 | ||
29 | /* store the actual version for log reporting */ | 29 | /* store the actual version for log reporting */ |
30 | char *hysdn_net_revision = "$Revision: 1.8.6.4 $"; | 30 | char *hysdn_net_revision = "$Revision: 1.8.6.4 $"; |
diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c index 33d339700411..a67d31af797a 100644 --- a/drivers/isdn/isdnloop/isdnloop.c +++ b/drivers/isdn/isdnloop/isdnloop.c | |||
@@ -22,7 +22,7 @@ static char *isdnloop_id = "loop0"; | |||
22 | MODULE_DESCRIPTION("ISDN4Linux: Pseudo Driver that simulates an ISDN card"); | 22 | MODULE_DESCRIPTION("ISDN4Linux: Pseudo Driver that simulates an ISDN card"); |
23 | MODULE_AUTHOR("Fritz Elfert"); | 23 | MODULE_AUTHOR("Fritz Elfert"); |
24 | MODULE_LICENSE("GPL"); | 24 | MODULE_LICENSE("GPL"); |
25 | MODULE_PARM(isdnloop_id, "s"); | 25 | module_param(isdnloop_id, charp, 0); |
26 | MODULE_PARM_DESC(isdnloop_id, "ID-String of first card"); | 26 | MODULE_PARM_DESC(isdnloop_id, "ID-String of first card"); |
27 | 27 | ||
28 | static int isdnloop_addcard(char *); | 28 | static int isdnloop_addcard(char *); |
diff --git a/drivers/media/video/zr36120.c b/drivers/media/video/zr36120.c index d4c633b8a7f5..417a999afee3 100644 --- a/drivers/media/video/zr36120.c +++ b/drivers/media/video/zr36120.c | |||
@@ -70,10 +70,10 @@ MODULE_AUTHOR("Pauline Middelink <middelin@polyware.nl>"); | |||
70 | MODULE_DESCRIPTION("Zoran ZR36120 based framegrabber"); | 70 | MODULE_DESCRIPTION("Zoran ZR36120 based framegrabber"); |
71 | MODULE_LICENSE("GPL"); | 71 | MODULE_LICENSE("GPL"); |
72 | 72 | ||
73 | MODULE_PARM(triton1,"i"); | 73 | module_param(triton1, uint, 0); |
74 | MODULE_PARM(cardtype,"1-" __MODULE_STRING(ZORAN_MAX) "i"); | 74 | module_param_array(cardtype, uint, NULL, 0); |
75 | MODULE_PARM(video_nr,"i"); | 75 | module_param(video_nr, int, 0); |
76 | MODULE_PARM(vbi_nr,"i"); | 76 | module_param(vbi_nr, int, 0); |
77 | 77 | ||
78 | static int zoran_cards; | 78 | static int zoran_cards; |
79 | static struct zoran zorans[ZORAN_MAX]; | 79 | static struct zoran zorans[ZORAN_MAX]; |
diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c index 8d84b045bc83..85e89c77bdea 100644 --- a/drivers/mmc/au1xmmc.c +++ b/drivers/mmc/au1xmmc.c | |||
@@ -87,7 +87,7 @@ struct au1xmmc_host *au1xmmc_hosts[AU1XMMC_CONTROLLER_COUNT]; | |||
87 | static int dma = 1; | 87 | static int dma = 1; |
88 | 88 | ||
89 | #ifdef MODULE | 89 | #ifdef MODULE |
90 | MODULE_PARM(dma, "i"); | 90 | module_param(dma, bool, 0); |
91 | MODULE_PARM_DESC(dma, "Use DMA engine for data transfers (0 = disabled)"); | 91 | MODULE_PARM_DESC(dma, "Use DMA engine for data transfers (0 = disabled)"); |
92 | #endif | 92 | #endif |
93 | 93 | ||
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index f0f8916da7ad..f988c817e196 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | #ifdef CONFIG_MTD_DEBUG | 29 | #ifdef CONFIG_MTD_DEBUG |
30 | static int debug = CONFIG_MTD_DEBUG_VERBOSE; | 30 | static int debug = CONFIG_MTD_DEBUG_VERBOSE; |
31 | MODULE_PARM(debug, "i"); | 31 | module_param(debug, int, 0); |
32 | MODULE_PARM_DESC(debug, "Set Debug Level 0=quiet, 5=noisy"); | 32 | MODULE_PARM_DESC(debug, "Set Debug Level 0=quiet, 5=noisy"); |
33 | #undef DEBUG | 33 | #undef DEBUG |
34 | #define DEBUG(n, format, arg...) \ | 34 | #define DEBUG(n, format, arg...) \ |
@@ -89,17 +89,17 @@ static int mem_type; | |||
89 | MODULE_LICENSE("GPL"); | 89 | MODULE_LICENSE("GPL"); |
90 | MODULE_AUTHOR("Simon Evans <spse@secret.org.uk>"); | 90 | MODULE_AUTHOR("Simon Evans <spse@secret.org.uk>"); |
91 | MODULE_DESCRIPTION(DRIVER_DESC); | 91 | MODULE_DESCRIPTION(DRIVER_DESC); |
92 | MODULE_PARM(bankwidth, "i"); | 92 | module_param(bankwidth, int, 0); |
93 | MODULE_PARM_DESC(bankwidth, "Set bankwidth (1=8 bit, 2=16 bit, default=2)"); | 93 | MODULE_PARM_DESC(bankwidth, "Set bankwidth (1=8 bit, 2=16 bit, default=2)"); |
94 | MODULE_PARM(mem_speed, "i"); | 94 | module_param(mem_speed, int, 0); |
95 | MODULE_PARM_DESC(mem_speed, "Set memory access speed in ns"); | 95 | MODULE_PARM_DESC(mem_speed, "Set memory access speed in ns"); |
96 | MODULE_PARM(force_size, "i"); | 96 | module_param(force_size, int, 0); |
97 | MODULE_PARM_DESC(force_size, "Force size of card in MiB (1-64)"); | 97 | MODULE_PARM_DESC(force_size, "Force size of card in MiB (1-64)"); |
98 | MODULE_PARM(setvpp, "i"); | 98 | module_param(setvpp, int, 0); |
99 | MODULE_PARM_DESC(setvpp, "Set Vpp (0=Never, 1=On writes, 2=Always on, default=0)"); | 99 | MODULE_PARM_DESC(setvpp, "Set Vpp (0=Never, 1=On writes, 2=Always on, default=0)"); |
100 | MODULE_PARM(vpp, "i"); | 100 | module_param(vpp, int, 0); |
101 | MODULE_PARM_DESC(vpp, "Vpp value in 1/10ths eg 33=3.3V 120=12V (Dangerous)"); | 101 | MODULE_PARM_DESC(vpp, "Vpp value in 1/10ths eg 33=3.3V 120=12V (Dangerous)"); |
102 | MODULE_PARM(mem_type, "i"); | 102 | module_param(mem_type, int, 0); |
103 | MODULE_PARM_DESC(mem_type, "Set Memory type (0=Flash, 1=RAM, 2=ROM, default=0)"); | 103 | MODULE_PARM_DESC(mem_type, "Set Memory type (0=Flash, 1=RAM, 2=ROM, default=0)"); |
104 | 104 | ||
105 | 105 | ||
diff --git a/drivers/net/atari_bionet.c b/drivers/net/atari_bionet.c index 0095384ff454..5e5f80b99b9e 100644 --- a/drivers/net/atari_bionet.c +++ b/drivers/net/atari_bionet.c | |||
@@ -123,7 +123,7 @@ static char version[] = | |||
123 | * Global variable 'bionet_debug'. Can be set at load time by 'insmod' | 123 | * Global variable 'bionet_debug'. Can be set at load time by 'insmod' |
124 | */ | 124 | */ |
125 | unsigned int bionet_debug = NET_DEBUG; | 125 | unsigned int bionet_debug = NET_DEBUG; |
126 | MODULE_PARM(bionet_debug, "i"); | 126 | module_param(bionet_debug, int, 0); |
127 | MODULE_PARM_DESC(bionet_debug, "bionet debug level (0-2)"); | 127 | MODULE_PARM_DESC(bionet_debug, "bionet debug level (0-2)"); |
128 | MODULE_LICENSE("GPL"); | 128 | MODULE_LICENSE("GPL"); |
129 | 129 | ||
diff --git a/drivers/net/atari_pamsnet.c b/drivers/net/atari_pamsnet.c index 8b997809f9de..d6039e62d832 100644 --- a/drivers/net/atari_pamsnet.c +++ b/drivers/net/atari_pamsnet.c | |||
@@ -119,7 +119,7 @@ static char *version = | |||
119 | * Global variable 'pamsnet_debug'. Can be set at load time by 'insmod' | 119 | * Global variable 'pamsnet_debug'. Can be set at load time by 'insmod' |
120 | */ | 120 | */ |
121 | unsigned int pamsnet_debug = NET_DEBUG; | 121 | unsigned int pamsnet_debug = NET_DEBUG; |
122 | MODULE_PARM(pamsnet_debug, "i"); | 122 | module_param(pamsnet_debug, int, 0); |
123 | MODULE_PARM_DESC(pamsnet_debug, "pamsnet debug enable (0-1)"); | 123 | MODULE_PARM_DESC(pamsnet_debug, "pamsnet debug enable (0-1)"); |
124 | MODULE_LICENSE("GPL"); | 124 | MODULE_LICENSE("GPL"); |
125 | 125 | ||
diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c index e01b6a78ec63..442b2cbeb58a 100644 --- a/drivers/net/atarilance.c +++ b/drivers/net/atarilance.c | |||
@@ -78,7 +78,7 @@ static int lance_debug = LANCE_DEBUG; | |||
78 | #else | 78 | #else |
79 | static int lance_debug = 1; | 79 | static int lance_debug = 1; |
80 | #endif | 80 | #endif |
81 | MODULE_PARM(lance_debug, "i"); | 81 | module_param(lance_debug, int, 0); |
82 | MODULE_PARM_DESC(lance_debug, "atarilance debug level (0-3)"); | 82 | MODULE_PARM_DESC(lance_debug, "atarilance debug level (0-3)"); |
83 | MODULE_LICENSE("GPL"); | 83 | MODULE_LICENSE("GPL"); |
84 | 84 | ||
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 8f1573e658a5..ac48f7543500 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -192,12 +192,15 @@ | |||
192 | static char version[] __devinitdata = | 192 | static char version[] __devinitdata = |
193 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; | 193 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; |
194 | 194 | ||
195 | static int cassini_debug = -1; /* -1 == use CAS_DEF_MSG_ENABLE as value */ | ||
196 | static int link_mode; | ||
197 | |||
195 | MODULE_AUTHOR("Adrian Sun (asun@darksunrising.com)"); | 198 | MODULE_AUTHOR("Adrian Sun (asun@darksunrising.com)"); |
196 | MODULE_DESCRIPTION("Sun Cassini(+) ethernet driver"); | 199 | MODULE_DESCRIPTION("Sun Cassini(+) ethernet driver"); |
197 | MODULE_LICENSE("GPL"); | 200 | MODULE_LICENSE("GPL"); |
198 | MODULE_PARM(cassini_debug, "i"); | 201 | module_param(cassini_debug, int, 0); |
199 | MODULE_PARM_DESC(cassini_debug, "Cassini bitmapped debugging message enable value"); | 202 | MODULE_PARM_DESC(cassini_debug, "Cassini bitmapped debugging message enable value"); |
200 | MODULE_PARM(link_mode, "i"); | 203 | module_param(link_mode, int, 0); |
201 | MODULE_PARM_DESC(link_mode, "default link mode"); | 204 | MODULE_PARM_DESC(link_mode, "default link mode"); |
202 | 205 | ||
203 | /* | 206 | /* |
@@ -209,7 +212,7 @@ MODULE_PARM_DESC(link_mode, "default link mode"); | |||
209 | * Value in seconds, for user input. | 212 | * Value in seconds, for user input. |
210 | */ | 213 | */ |
211 | static int linkdown_timeout = DEFAULT_LINKDOWN_TIMEOUT; | 214 | static int linkdown_timeout = DEFAULT_LINKDOWN_TIMEOUT; |
212 | MODULE_PARM(linkdown_timeout, "i"); | 215 | module_param(linkdown_timeout, int, 0); |
213 | MODULE_PARM_DESC(linkdown_timeout, | 216 | MODULE_PARM_DESC(linkdown_timeout, |
214 | "min reset interval in sec. for PCS linkdown issue; disabled if not positive"); | 217 | "min reset interval in sec. for PCS linkdown issue; disabled if not positive"); |
215 | 218 | ||
@@ -221,8 +224,6 @@ MODULE_PARM_DESC(linkdown_timeout, | |||
221 | static int link_transition_timeout; | 224 | static int link_transition_timeout; |
222 | 225 | ||
223 | 226 | ||
224 | static int cassini_debug = -1; /* -1 == use CAS_DEF_MSG_ENABLE as value */ | ||
225 | static int link_mode; | ||
226 | 227 | ||
227 | static u16 link_modes[] __devinitdata = { | 228 | static u16 link_modes[] __devinitdata = { |
228 | BMCR_ANENABLE, /* 0 : autoneg */ | 229 | BMCR_ANENABLE, /* 0 : autoneg */ |
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index 349ebe783ed6..7fe2638ae06d 100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c | |||
@@ -124,7 +124,7 @@ MODULE_LICENSE("GPL"); | |||
124 | 124 | ||
125 | static int dflt_msg_enable = DFLT_MSG_ENABLE; | 125 | static int dflt_msg_enable = DFLT_MSG_ENABLE; |
126 | 126 | ||
127 | MODULE_PARM(dflt_msg_enable, "i"); | 127 | module_param(dflt_msg_enable, int, 0); |
128 | MODULE_PARM_DESC(dflt_msg_enable, "Chelsio T1 message enable bitmap"); | 128 | MODULE_PARM_DESC(dflt_msg_enable, "Chelsio T1 message enable bitmap"); |
129 | 129 | ||
130 | 130 | ||
diff --git a/drivers/net/fec_8xx/fec_main.c b/drivers/net/fec_8xx/fec_main.c index b4f3a9f8a535..7e4338097139 100644 --- a/drivers/net/fec_8xx/fec_main.c +++ b/drivers/net/fec_8xx/fec_main.c | |||
@@ -55,11 +55,11 @@ MODULE_AUTHOR("Pantelis Antoniou <panto@intracom.gr>"); | |||
55 | MODULE_DESCRIPTION("Motorola 8xx FEC ethernet driver"); | 55 | MODULE_DESCRIPTION("Motorola 8xx FEC ethernet driver"); |
56 | MODULE_LICENSE("GPL"); | 56 | MODULE_LICENSE("GPL"); |
57 | 57 | ||
58 | MODULE_PARM(fec_8xx_debug, "i"); | 58 | int fec_8xx_debug = -1; /* -1 == use FEC_8XX_DEF_MSG_ENABLE as value */ |
59 | module_param(fec_8xx_debug, int, 0); | ||
59 | MODULE_PARM_DESC(fec_8xx_debug, | 60 | MODULE_PARM_DESC(fec_8xx_debug, |
60 | "FEC 8xx bitmapped debugging message enable value"); | 61 | "FEC 8xx bitmapped debugging message enable value"); |
61 | 62 | ||
62 | int fec_8xx_debug = -1; /* -1 == use FEC_8XX_DEF_MSG_ENABLE as value */ | ||
63 | 63 | ||
64 | /*************************************************/ | 64 | /*************************************************/ |
65 | 65 | ||
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index f5d49a110654..196298f33db8 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -58,11 +58,11 @@ MODULE_DESCRIPTION("Freescale Ethernet Driver"); | |||
58 | MODULE_LICENSE("GPL"); | 58 | MODULE_LICENSE("GPL"); |
59 | MODULE_VERSION(DRV_MODULE_VERSION); | 59 | MODULE_VERSION(DRV_MODULE_VERSION); |
60 | 60 | ||
61 | MODULE_PARM(fs_enet_debug, "i"); | 61 | int fs_enet_debug = -1; /* -1 == use FS_ENET_DEF_MSG_ENABLE as value */ |
62 | module_param(fs_enet_debug, int, 0); | ||
62 | MODULE_PARM_DESC(fs_enet_debug, | 63 | MODULE_PARM_DESC(fs_enet_debug, |
63 | "Freescale bitmapped debugging message enable value"); | 64 | "Freescale bitmapped debugging message enable value"); |
64 | 65 | ||
65 | int fs_enet_debug = -1; /* -1 == use FS_ENET_DEF_MSG_ENABLE as value */ | ||
66 | 66 | ||
67 | static void fs_set_multicast_list(struct net_device *dev) | 67 | static void fs_set_multicast_list(struct net_device *dev) |
68 | { | 68 | { |
diff --git a/drivers/net/gt96100eth.c b/drivers/net/gt96100eth.c index 5958a6314723..2d2435404614 100644 --- a/drivers/net/gt96100eth.c +++ b/drivers/net/gt96100eth.c | |||
@@ -114,8 +114,8 @@ static int max_interrupt_work = 32; | |||
114 | 114 | ||
115 | static char mac0[18] = "00.02.03.04.05.06"; | 115 | static char mac0[18] = "00.02.03.04.05.06"; |
116 | static char mac1[18] = "00.01.02.03.04.05"; | 116 | static char mac1[18] = "00.01.02.03.04.05"; |
117 | MODULE_PARM(mac0, "c18"); | 117 | module_param_string(mac0, mac0, 18, 0); |
118 | MODULE_PARM(mac1, "c18"); | 118 | module_param_string(mac1, mac0, 18, 0); |
119 | MODULE_PARM_DESC(mac0, "MAC address for GT96100 ethernet port 0"); | 119 | MODULE_PARM_DESC(mac0, "MAC address for GT96100 ethernet port 0"); |
120 | MODULE_PARM_DESC(mac1, "MAC address for GT96100 ethernet port 1"); | 120 | MODULE_PARM_DESC(mac1, "MAC address for GT96100 ethernet port 1"); |
121 | 121 | ||
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index c8dc40214a08..79a8fbcf5f93 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c | |||
@@ -280,7 +280,7 @@ static unsigned long rand; | |||
280 | 280 | ||
281 | MODULE_AUTHOR("Klaus Kudielka"); | 281 | MODULE_AUTHOR("Klaus Kudielka"); |
282 | MODULE_DESCRIPTION("Driver for high-speed SCC boards"); | 282 | MODULE_DESCRIPTION("Driver for high-speed SCC boards"); |
283 | MODULE_PARM(io, "1-" __MODULE_STRING(MAX_NUM_DEVS) "i"); | 283 | module_param_array(io, int, NULL, 0); |
284 | MODULE_LICENSE("GPL"); | 284 | MODULE_LICENSE("GPL"); |
285 | 285 | ||
286 | static void __exit dmascc_exit(void) | 286 | static void __exit dmascc_exit(void) |
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index dc5e9d59deed..d81a8e1eeb8d 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -1012,7 +1012,7 @@ static void __exit mkiss_exit_driver(void) | |||
1012 | 1012 | ||
1013 | MODULE_AUTHOR("Ralf Baechle DL5RB <ralf@linux-mips.org>"); | 1013 | MODULE_AUTHOR("Ralf Baechle DL5RB <ralf@linux-mips.org>"); |
1014 | MODULE_DESCRIPTION("KISS driver for AX.25 over TTYs"); | 1014 | MODULE_DESCRIPTION("KISS driver for AX.25 over TTYs"); |
1015 | MODULE_PARM(crc_force, "i"); | 1015 | module_param(crc_force, int, 0); |
1016 | MODULE_PARM_DESC(crc_force, "crc [0 = auto | 1 = none | 2 = flexnet | 3 = smack]"); | 1016 | MODULE_PARM_DESC(crc_force, "crc [0 = auto | 1 = none | 2 = flexnet | 3 = smack]"); |
1017 | MODULE_LICENSE("GPL"); | 1017 | MODULE_LICENSE("GPL"); |
1018 | MODULE_ALIAS_LDISC(N_AX25); | 1018 | MODULE_ALIAS_LDISC(N_AX25); |
diff --git a/drivers/net/irda/irport.c b/drivers/net/irda/irport.c index 6070195b87bd..98fa5319e5cc 100644 --- a/drivers/net/irda/irport.c +++ b/drivers/net/irda/irport.c | |||
@@ -1118,9 +1118,9 @@ static void __exit irport_cleanup(void) | |||
1118 | } | 1118 | } |
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | MODULE_PARM(io, "1-4i"); | 1121 | module_param_array(io, int, NULL, 0); |
1122 | MODULE_PARM_DESC(io, "Base I/O addresses"); | 1122 | MODULE_PARM_DESC(io, "Base I/O addresses"); |
1123 | MODULE_PARM(irq, "1-4i"); | 1123 | module_param_array(irq, int, NULL, 0); |
1124 | MODULE_PARM_DESC(irq, "IRQ lines"); | 1124 | MODULE_PARM_DESC(irq, "IRQ lines"); |
1125 | 1125 | ||
1126 | MODULE_AUTHOR("Dag Brattli <dagb@cs.uit.no>"); | 1126 | MODULE_AUTHOR("Dag Brattli <dagb@cs.uit.no>"); |
diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c index f7b7238d8352..957888de3d7e 100644 --- a/drivers/net/lasi_82596.c +++ b/drivers/net/lasi_82596.c | |||
@@ -177,7 +177,7 @@ static int i596_debug = (DEB_SERIOUS|DEB_PROBE); | |||
177 | MODULE_AUTHOR("Richard Hirst"); | 177 | MODULE_AUTHOR("Richard Hirst"); |
178 | MODULE_DESCRIPTION("i82596 driver"); | 178 | MODULE_DESCRIPTION("i82596 driver"); |
179 | MODULE_LICENSE("GPL"); | 179 | MODULE_LICENSE("GPL"); |
180 | MODULE_PARM(i596_debug, "i"); | 180 | module_param(i596_debug, int, 0); |
181 | MODULE_PARM_DESC(i596_debug, "lasi_82596 debug mask"); | 181 | MODULE_PARM_DESC(i596_debug, "lasi_82596 debug mask"); |
182 | 182 | ||
183 | /* Copy frames shorter than rx_copybreak, otherwise pass on up in | 183 | /* Copy frames shorter than rx_copybreak, otherwise pass on up in |
@@ -1520,9 +1520,9 @@ static void set_multicast_list(struct net_device *dev) | |||
1520 | } | 1520 | } |
1521 | } | 1521 | } |
1522 | 1522 | ||
1523 | MODULE_PARM(debug, "i"); | ||
1524 | MODULE_PARM_DESC(debug, "lasi_82596 debug mask"); | ||
1525 | static int debug = -1; | 1523 | static int debug = -1; |
1524 | module_param(debug, int, 0); | ||
1525 | MODULE_PARM_DESC(debug, "lasi_82596 debug mask"); | ||
1526 | 1526 | ||
1527 | static int num_drivers; | 1527 | static int num_drivers; |
1528 | static struct net_device *netdevs[MAX_DRIVERS]; | 1528 | static struct net_device *netdevs[MAX_DRIVERS]; |
diff --git a/drivers/net/mac89x0.c b/drivers/net/mac89x0.c index f65b0db111b8..cd3c9a5a98b2 100644 --- a/drivers/net/mac89x0.c +++ b/drivers/net/mac89x0.c | |||
@@ -629,7 +629,7 @@ static int set_mac_address(struct net_device *dev, void *addr) | |||
629 | static struct net_device *dev_cs89x0; | 629 | static struct net_device *dev_cs89x0; |
630 | static int debug; | 630 | static int debug; |
631 | 631 | ||
632 | MODULE_PARM(debug, "i"); | 632 | module_param(debug, int, 0); |
633 | MODULE_PARM_DESC(debug, "CS89[02]0 debug level (0-5)"); | 633 | MODULE_PARM_DESC(debug, "CS89[02]0 debug level (0-5)"); |
634 | MODULE_LICENSE("GPL"); | 634 | MODULE_LICENSE("GPL"); |
635 | 635 | ||
diff --git a/drivers/net/mace.c b/drivers/net/mace.c index 2a5add257b8f..77792b286027 100644 --- a/drivers/net/mace.c +++ b/drivers/net/mace.c | |||
@@ -1042,7 +1042,7 @@ static void __exit mace_cleanup(void) | |||
1042 | 1042 | ||
1043 | MODULE_AUTHOR("Paul Mackerras"); | 1043 | MODULE_AUTHOR("Paul Mackerras"); |
1044 | MODULE_DESCRIPTION("PowerMac MACE driver."); | 1044 | MODULE_DESCRIPTION("PowerMac MACE driver."); |
1045 | MODULE_PARM(port_aaui, "i"); | 1045 | module_param(port_aaui, int, 0); |
1046 | MODULE_PARM_DESC(port_aaui, "MACE uses AAUI port (0-1)"); | 1046 | MODULE_PARM_DESC(port_aaui, "MACE uses AAUI port (0-1)"); |
1047 | MODULE_LICENSE("GPL"); | 1047 | MODULE_LICENSE("GPL"); |
1048 | 1048 | ||
diff --git a/drivers/net/meth.c b/drivers/net/meth.c index e23655f5049f..d644bf3a933c 100644 --- a/drivers/net/meth.c +++ b/drivers/net/meth.c | |||
@@ -62,7 +62,7 @@ MODULE_DESCRIPTION("SGI O2 Builtin Fast Ethernet driver"); | |||
62 | 62 | ||
63 | #ifdef HAVE_TX_TIMEOUT | 63 | #ifdef HAVE_TX_TIMEOUT |
64 | static int timeout = TX_TIMEOUT; | 64 | static int timeout = TX_TIMEOUT; |
65 | MODULE_PARM(timeout, "i"); | 65 | module_param(timeout, int, 0); |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | /* | 68 | /* |
diff --git a/drivers/net/ne-h8300.c b/drivers/net/ne-h8300.c index aaebd28a1920..7ea3d596ac3b 100644 --- a/drivers/net/ne-h8300.c +++ b/drivers/net/ne-h8300.c | |||
@@ -601,9 +601,9 @@ static int io[MAX_NE_CARDS]; | |||
601 | static int irq[MAX_NE_CARDS]; | 601 | static int irq[MAX_NE_CARDS]; |
602 | static int bad[MAX_NE_CARDS]; /* 0xbad = bad sig or no reset ack */ | 602 | static int bad[MAX_NE_CARDS]; /* 0xbad = bad sig or no reset ack */ |
603 | 603 | ||
604 | MODULE_PARM(io, "1-" __MODULE_STRING(MAX_NE_CARDS) "i"); | 604 | module_param_array(io, int, NULL, 0); |
605 | MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_NE_CARDS) "i"); | 605 | module_param_array(irq, int, NULL, 0); |
606 | MODULE_PARM(bad, "1-" __MODULE_STRING(MAX_NE_CARDS) "i"); | 606 | module_param_array(bad, int, NULL, 0); |
607 | MODULE_PARM_DESC(io, "I/O base address(es)"); | 607 | MODULE_PARM_DESC(io, "I/O base address(es)"); |
608 | MODULE_PARM_DESC(irq, "IRQ number(s)"); | 608 | MODULE_PARM_DESC(irq, "IRQ number(s)"); |
609 | MODULE_DESCRIPTION("H8/300 NE2000 Ethernet driver"); | 609 | MODULE_DESCRIPTION("H8/300 NE2000 Ethernet driver"); |
diff --git a/drivers/net/ni5010.c b/drivers/net/ni5010.c index 2ab01a5d1d22..a68bf474f6ed 100644 --- a/drivers/net/ni5010.c +++ b/drivers/net/ni5010.c | |||
@@ -766,8 +766,8 @@ static void ni5010_show_registers(struct net_device *dev) | |||
766 | #ifdef MODULE | 766 | #ifdef MODULE |
767 | static struct net_device *dev_ni5010; | 767 | static struct net_device *dev_ni5010; |
768 | 768 | ||
769 | MODULE_PARM(io, "i"); | 769 | module_param(io, int, 0); |
770 | MODULE_PARM(irq, "i"); | 770 | module_param(irq, int, 0); |
771 | MODULE_PARM_DESC(io, "ni5010 I/O base address"); | 771 | MODULE_PARM_DESC(io, "ni5010 I/O base address"); |
772 | MODULE_PARM_DESC(irq, "ni5010 IRQ number"); | 772 | MODULE_PARM_DESC(irq, "ni5010 IRQ number"); |
773 | 773 | ||
diff --git a/drivers/net/sun3lance.c b/drivers/net/sun3lance.c index 01bdb2334058..d4c0002b43db 100644 --- a/drivers/net/sun3lance.c +++ b/drivers/net/sun3lance.c | |||
@@ -71,7 +71,7 @@ static int lance_debug = LANCE_DEBUG; | |||
71 | #else | 71 | #else |
72 | static int lance_debug = 1; | 72 | static int lance_debug = 1; |
73 | #endif | 73 | #endif |
74 | MODULE_PARM(lance_debug, "i"); | 74 | module_param(lance_debug, int, 0); |
75 | MODULE_PARM_DESC(lance_debug, "SUN3 Lance debug level (0-3)"); | 75 | MODULE_PARM_DESC(lance_debug, "SUN3 Lance debug level (0-3)"); |
76 | MODULE_LICENSE("GPL"); | 76 | MODULE_LICENSE("GPL"); |
77 | 77 | ||
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index dfe542b206cc..7967916bda18 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -43,7 +43,6 @@ MODULE_AUTHOR("Holger Smolinski <Holger.Smolinski@de.ibm.com>"); | |||
43 | MODULE_DESCRIPTION("Linux on S/390 DASD device driver," | 43 | MODULE_DESCRIPTION("Linux on S/390 DASD device driver," |
44 | " Copyright 2000 IBM Corporation"); | 44 | " Copyright 2000 IBM Corporation"); |
45 | MODULE_SUPPORTED_DEVICE("dasd"); | 45 | MODULE_SUPPORTED_DEVICE("dasd"); |
46 | MODULE_PARM(dasd, "1-" __MODULE_STRING(256) "s"); | ||
47 | MODULE_LICENSE("GPL"); | 46 | MODULE_LICENSE("GPL"); |
48 | 47 | ||
49 | /* | 48 | /* |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index f576f243cd93..2f720108a7e0 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/module.h> | ||
19 | 20 | ||
20 | #include <asm/debug.h> | 21 | #include <asm/debug.h> |
21 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
@@ -69,6 +70,8 @@ int dasd_autodetect = 0; /* is true, when autodetection is active */ | |||
69 | * strings when running as a module. | 70 | * strings when running as a module. |
70 | */ | 71 | */ |
71 | static char *dasd[256]; | 72 | static char *dasd[256]; |
73 | module_param_array(dasd, charp, NULL, 0); | ||
74 | |||
72 | /* | 75 | /* |
73 | * Single spinlock to protect devmap structures and lists. | 76 | * Single spinlock to protect devmap structures and lists. |
74 | */ | 77 | */ |
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c index 583d2d8c8335..fad2109268bb 100644 --- a/drivers/scsi/arm/cumana_2.c +++ b/drivers/scsi/arm/cumana_2.c | |||
@@ -550,6 +550,6 @@ module_exit(cumanascsi2_exit); | |||
550 | 550 | ||
551 | MODULE_AUTHOR("Russell King"); | 551 | MODULE_AUTHOR("Russell King"); |
552 | MODULE_DESCRIPTION("Cumana SCSI-2 driver for Acorn machines"); | 552 | MODULE_DESCRIPTION("Cumana SCSI-2 driver for Acorn machines"); |
553 | MODULE_PARM(term, "1-8i"); | 553 | module_param_array(term, int, NULL, 0); |
554 | MODULE_PARM_DESC(term, "SCSI bus termination"); | 554 | MODULE_PARM_DESC(term, "SCSI bus termination"); |
555 | MODULE_LICENSE("GPL"); | 555 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c index 3ffec7efc9d5..dcbb4b2b3fe0 100644 --- a/drivers/scsi/arm/eesox.c +++ b/drivers/scsi/arm/eesox.c | |||
@@ -674,6 +674,6 @@ module_exit(eesox_exit); | |||
674 | 674 | ||
675 | MODULE_AUTHOR("Russell King"); | 675 | MODULE_AUTHOR("Russell King"); |
676 | MODULE_DESCRIPTION("EESOX 'Fast' SCSI driver for Acorn machines"); | 676 | MODULE_DESCRIPTION("EESOX 'Fast' SCSI driver for Acorn machines"); |
677 | MODULE_PARM(term, "1-8i"); | 677 | module_param_array(term, int, NULL, 0); |
678 | MODULE_PARM_DESC(term, "SCSI bus termination"); | 678 | MODULE_PARM_DESC(term, "SCSI bus termination"); |
679 | MODULE_LICENSE("GPL"); | 679 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c index 3113bdcedb13..3d69f6c45a6b 100644 --- a/drivers/scsi/arm/powertec.c +++ b/drivers/scsi/arm/powertec.c | |||
@@ -466,6 +466,6 @@ module_exit(powertecscsi_exit); | |||
466 | 466 | ||
467 | MODULE_AUTHOR("Russell King"); | 467 | MODULE_AUTHOR("Russell King"); |
468 | MODULE_DESCRIPTION("Powertec SCSI driver"); | 468 | MODULE_DESCRIPTION("Powertec SCSI driver"); |
469 | MODULE_PARM(term, "1-8i"); | 469 | module_param_array(term, int, NULL, 0); |
470 | MODULE_PARM_DESC(term, "SCSI bus termination"); | 470 | MODULE_PARM_DESC(term, "SCSI bus termination"); |
471 | MODULE_LICENSE("GPL"); | 471 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index f4c1ca7c1572..f677c5a32a68 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c | |||
@@ -239,17 +239,17 @@ static int atari_read_overruns = 0; | |||
239 | #endif | 239 | #endif |
240 | 240 | ||
241 | static int setup_can_queue = -1; | 241 | static int setup_can_queue = -1; |
242 | MODULE_PARM(setup_can_queue, "i"); | 242 | module_param(setup_can_queue, int, 0); |
243 | static int setup_cmd_per_lun = -1; | 243 | static int setup_cmd_per_lun = -1; |
244 | MODULE_PARM(setup_cmd_per_lun, "i"); | 244 | module_param(setup_cmd_per_lun, int, 0); |
245 | static int setup_sg_tablesize = -1; | 245 | static int setup_sg_tablesize = -1; |
246 | MODULE_PARM(setup_sg_tablesize, "i"); | 246 | module_param(setup_sg_tablesize, int, 0); |
247 | #ifdef SUPPORT_TAGS | 247 | #ifdef SUPPORT_TAGS |
248 | static int setup_use_tagged_queuing = -1; | 248 | static int setup_use_tagged_queuing = -1; |
249 | MODULE_PARM(setup_use_tagged_queuing, "i"); | 249 | module_param(setup_use_tagged_queuing, int, 0); |
250 | #endif | 250 | #endif |
251 | static int setup_hostid = -1; | 251 | static int setup_hostid = -1; |
252 | MODULE_PARM(setup_hostid, "i"); | 252 | module_param(setup_hostid, int, 0); |
253 | 253 | ||
254 | 254 | ||
255 | #if defined(CONFIG_TT_DMA_EMUL) | 255 | #if defined(CONFIG_TT_DMA_EMUL) |
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c index 0e78ddc81583..52c18a35fb41 100644 --- a/drivers/video/pm3fb.c +++ b/drivers/video/pm3fb.c | |||
@@ -3532,26 +3532,26 @@ int __init pm3fb_init(void) | |||
3532 | MODULE_AUTHOR("Romain Dolbeau"); | 3532 | MODULE_AUTHOR("Romain Dolbeau"); |
3533 | MODULE_DESCRIPTION("Permedia3 framebuffer device driver"); | 3533 | MODULE_DESCRIPTION("Permedia3 framebuffer device driver"); |
3534 | static char *mode[PM3_MAX_BOARD]; | 3534 | static char *mode[PM3_MAX_BOARD]; |
3535 | MODULE_PARM(mode,PM3_MAX_BOARD_MODULE_ARRAY_STRING); | 3535 | module_param_array(mode, charp, NULL, 0); |
3536 | MODULE_PARM_DESC(mode,"video mode"); | 3536 | MODULE_PARM_DESC(mode,"video mode"); |
3537 | MODULE_PARM(disable,PM3_MAX_BOARD_MODULE_ARRAY_SHORT); | 3537 | module_param_array(disable, short, NULL, 0); |
3538 | MODULE_PARM_DESC(disable,"disable board"); | 3538 | MODULE_PARM_DESC(disable,"disable board"); |
3539 | static short off[PM3_MAX_BOARD]; | 3539 | static short off[PM3_MAX_BOARD]; |
3540 | MODULE_PARM(off,PM3_MAX_BOARD_MODULE_ARRAY_SHORT); | 3540 | module_param_array(off, short, NULL, 0); |
3541 | MODULE_PARM_DESC(off,"disable board"); | 3541 | MODULE_PARM_DESC(off,"disable board"); |
3542 | static char *pciid[PM3_MAX_BOARD]; | 3542 | static char *pciid[PM3_MAX_BOARD]; |
3543 | MODULE_PARM(pciid,PM3_MAX_BOARD_MODULE_ARRAY_STRING); | 3543 | module_param_array(pciid, charp, NULL, 0); |
3544 | MODULE_PARM_DESC(pciid,"board PCI Id"); | 3544 | MODULE_PARM_DESC(pciid,"board PCI Id"); |
3545 | MODULE_PARM(noaccel,PM3_MAX_BOARD_MODULE_ARRAY_SHORT); | 3545 | module_param_array(noaccel, short, NULL, 0); |
3546 | MODULE_PARM_DESC(noaccel,"disable accel"); | 3546 | MODULE_PARM_DESC(noaccel,"disable accel"); |
3547 | static char *font[PM3_MAX_BOARD]; | 3547 | static char *font[PM3_MAX_BOARD]; |
3548 | MODULE_PARM(font,PM3_MAX_BOARD_MODULE_ARRAY_STRING); | 3548 | module_param_array(font, charp, NULL, 0); |
3549 | MODULE_PARM_DESC(font,"choose font"); | 3549 | MODULE_PARM_DESC(font,"choose font"); |
3550 | MODULE_PARM(depth,PM3_MAX_BOARD_MODULE_ARRAY_SHORT); | 3550 | module_param(depth, short, NULL, 0); |
3551 | MODULE_PARM_DESC(depth,"boot-time depth"); | 3551 | MODULE_PARM_DESC(depth,"boot-time depth"); |
3552 | MODULE_PARM(printtimings, "h"); | 3552 | module_param(printtimings, short, NULL, 0); |
3553 | MODULE_PARM_DESC(printtimings, "print the memory timings of the card(s)"); | 3553 | MODULE_PARM_DESC(printtimings, "print the memory timings of the card(s)"); |
3554 | MODULE_PARM(forcesize, PM3_MAX_BOARD_MODULE_ARRAY_SHORT); | 3554 | module_param(forcesize, short, NULL, 0); |
3555 | MODULE_PARM_DESC(forcesize, "force specified memory size"); | 3555 | MODULE_PARM_DESC(forcesize, "force specified memory size"); |
3556 | /* | 3556 | /* |
3557 | MODULE_SUPPORTED_DEVICE("Permedia3 PCI boards") | 3557 | MODULE_SUPPORTED_DEVICE("Permedia3 PCI boards") |
diff --git a/include/linux/module.h b/include/linux/module.h index 70bd843c71cb..e144309836af 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -554,25 +554,6 @@ static inline void module_remove_driver(struct device_driver *driver) | |||
554 | 554 | ||
555 | /* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */ | 555 | /* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */ |
556 | 556 | ||
557 | struct obsolete_modparm { | ||
558 | char name[64]; | ||
559 | char type[64-sizeof(void *)]; | ||
560 | void *addr; | ||
561 | }; | ||
562 | |||
563 | static inline void MODULE_PARM_(void) { } | ||
564 | #ifdef MODULE | ||
565 | /* DEPRECATED: Do not use. */ | ||
566 | #define MODULE_PARM(var,type) \ | ||
567 | extern struct obsolete_modparm __parm_##var \ | ||
568 | __attribute__((section("__obsparm"))); \ | ||
569 | struct obsolete_modparm __parm_##var = \ | ||
570 | { __stringify(var), type, &MODULE_PARM_ }; \ | ||
571 | __MODULE_PARM_TYPE(var, type); | ||
572 | #else | ||
573 | #define MODULE_PARM(var,type) static void __attribute__((__unused__)) *__parm_##var = &MODULE_PARM_; | ||
574 | #endif | ||
575 | |||
576 | #define __MODULE_STRING(x) __stringify(x) | 557 | #define __MODULE_STRING(x) __stringify(x) |
577 | 558 | ||
578 | /* Use symbol_get and symbol_put instead. You'll thank me. */ | 559 | /* Use symbol_get and symbol_put instead. You'll thank me. */ |
diff --git a/include/video/pm3fb.h b/include/video/pm3fb.h index 6f4ea808cf74..ac021379ac40 100644 --- a/include/video/pm3fb.h +++ b/include/video/pm3fb.h | |||
@@ -1128,10 +1128,7 @@ | |||
1128 | #endif | 1128 | #endif |
1129 | 1129 | ||
1130 | /* max number of simultaneous board */ | 1130 | /* max number of simultaneous board */ |
1131 | /* warning : make sure module array def's are coherent with PM3_MAX_BOARD */ | ||
1132 | #define PM3_MAX_BOARD 4 | 1131 | #define PM3_MAX_BOARD 4 |
1133 | #define PM3_MAX_BOARD_MODULE_ARRAY_SHORT "1-4h" | ||
1134 | #define PM3_MAX_BOARD_MODULE_ARRAY_STRING "1-4s" | ||
1135 | 1132 | ||
1136 | /* max size of options */ | 1133 | /* max size of options */ |
1137 | #define PM3_OPTIONS_SIZE 256 | 1134 | #define PM3_OPTIONS_SIZE 256 |
diff --git a/init/Kconfig b/init/Kconfig index 1d19fd25204b..05951c1d654e 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -470,15 +470,6 @@ config MODULE_FORCE_UNLOAD | |||
470 | rmmod). This is mainly for kernel developers and desperate users. | 470 | rmmod). This is mainly for kernel developers and desperate users. |
471 | If unsure, say N. | 471 | If unsure, say N. |
472 | 472 | ||
473 | config OBSOLETE_MODPARM | ||
474 | bool | ||
475 | default y | ||
476 | depends on MODULES | ||
477 | help | ||
478 | You need this option to use module parameters on modules which | ||
479 | have not been converted to the new module parameter system yet. | ||
480 | If unsure, say Y. | ||
481 | |||
482 | config MODVERSIONS | 473 | config MODVERSIONS |
483 | bool "Module versioning support" | 474 | bool "Module versioning support" |
484 | depends on MODULES | 475 | depends on MODULES |
diff --git a/kernel/module.c b/kernel/module.c index 54623c714bba..ddfe45ac2fd1 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -233,24 +233,6 @@ static unsigned long __find_symbol(const char *name, | |||
233 | return 0; | 233 | return 0; |
234 | } | 234 | } |
235 | 235 | ||
236 | /* Find a symbol in this elf symbol table */ | ||
237 | static unsigned long find_local_symbol(Elf_Shdr *sechdrs, | ||
238 | unsigned int symindex, | ||
239 | const char *strtab, | ||
240 | const char *name) | ||
241 | { | ||
242 | unsigned int i; | ||
243 | Elf_Sym *sym = (void *)sechdrs[symindex].sh_addr; | ||
244 | |||
245 | /* Search (defined) internal symbols first. */ | ||
246 | for (i = 1; i < sechdrs[symindex].sh_size/sizeof(*sym); i++) { | ||
247 | if (sym[i].st_shndx != SHN_UNDEF | ||
248 | && strcmp(name, strtab + sym[i].st_name) == 0) | ||
249 | return sym[i].st_value; | ||
250 | } | ||
251 | return 0; | ||
252 | } | ||
253 | |||
254 | /* Search for module by name: must hold module_mutex. */ | 236 | /* Search for module by name: must hold module_mutex. */ |
255 | static struct module *find_module(const char *name) | 237 | static struct module *find_module(const char *name) |
256 | { | 238 | { |
@@ -785,139 +767,6 @@ static struct module_attribute *modinfo_attrs[] = { | |||
785 | NULL, | 767 | NULL, |
786 | }; | 768 | }; |
787 | 769 | ||
788 | #ifdef CONFIG_OBSOLETE_MODPARM | ||
789 | /* Bounds checking done below */ | ||
790 | static int obsparm_copy_string(const char *val, struct kernel_param *kp) | ||
791 | { | ||
792 | strcpy(kp->arg, val); | ||
793 | return 0; | ||
794 | } | ||
795 | |||
796 | static int set_obsolete(const char *val, struct kernel_param *kp) | ||
797 | { | ||
798 | unsigned int min, max; | ||
799 | unsigned int size, maxsize; | ||
800 | int dummy; | ||
801 | char *endp; | ||
802 | const char *p; | ||
803 | struct obsolete_modparm *obsparm = kp->arg; | ||
804 | |||
805 | if (!val) { | ||
806 | printk(KERN_ERR "Parameter %s needs an argument\n", kp->name); | ||
807 | return -EINVAL; | ||
808 | } | ||
809 | |||
810 | /* type is: [min[-max]]{b,h,i,l,s} */ | ||
811 | p = obsparm->type; | ||
812 | min = simple_strtol(p, &endp, 10); | ||
813 | if (endp == obsparm->type) | ||
814 | min = max = 1; | ||
815 | else if (*endp == '-') { | ||
816 | p = endp+1; | ||
817 | max = simple_strtol(p, &endp, 10); | ||
818 | } else | ||
819 | max = min; | ||
820 | switch (*endp) { | ||
821 | case 'b': | ||
822 | return param_array(kp->name, val, min, max, obsparm->addr, | ||
823 | 1, param_set_byte, &dummy); | ||
824 | case 'h': | ||
825 | return param_array(kp->name, val, min, max, obsparm->addr, | ||
826 | sizeof(short), param_set_short, &dummy); | ||
827 | case 'i': | ||
828 | return param_array(kp->name, val, min, max, obsparm->addr, | ||
829 | sizeof(int), param_set_int, &dummy); | ||
830 | case 'l': | ||
831 | return param_array(kp->name, val, min, max, obsparm->addr, | ||
832 | sizeof(long), param_set_long, &dummy); | ||
833 | case 's': | ||
834 | return param_array(kp->name, val, min, max, obsparm->addr, | ||
835 | sizeof(char *), param_set_charp, &dummy); | ||
836 | |||
837 | case 'c': | ||
838 | /* Undocumented: 1-5c50 means 1-5 strings of up to 49 chars, | ||
839 | and the decl is "char xxx[5][50];" */ | ||
840 | p = endp+1; | ||
841 | maxsize = simple_strtol(p, &endp, 10); | ||
842 | /* We check lengths here (yes, this is a hack). */ | ||
843 | p = val; | ||
844 | while (p[size = strcspn(p, ",")]) { | ||
845 | if (size >= maxsize) | ||
846 | goto oversize; | ||
847 | p += size+1; | ||
848 | } | ||
849 | if (size >= maxsize) | ||
850 | goto oversize; | ||
851 | return param_array(kp->name, val, min, max, obsparm->addr, | ||
852 | maxsize, obsparm_copy_string, &dummy); | ||
853 | } | ||
854 | printk(KERN_ERR "Unknown obsolete parameter type %s\n", obsparm->type); | ||
855 | return -EINVAL; | ||
856 | oversize: | ||
857 | printk(KERN_ERR | ||
858 | "Parameter %s doesn't fit in %u chars.\n", kp->name, maxsize); | ||
859 | return -EINVAL; | ||
860 | } | ||
861 | |||
862 | static int obsolete_params(const char *name, | ||
863 | char *args, | ||
864 | struct obsolete_modparm obsparm[], | ||
865 | unsigned int num, | ||
866 | Elf_Shdr *sechdrs, | ||
867 | unsigned int symindex, | ||
868 | const char *strtab) | ||
869 | { | ||
870 | struct kernel_param *kp; | ||
871 | unsigned int i; | ||
872 | int ret; | ||
873 | |||
874 | kp = kmalloc(sizeof(kp[0]) * num, GFP_KERNEL); | ||
875 | if (!kp) | ||
876 | return -ENOMEM; | ||
877 | |||
878 | for (i = 0; i < num; i++) { | ||
879 | char sym_name[128 + sizeof(MODULE_SYMBOL_PREFIX)]; | ||
880 | |||
881 | snprintf(sym_name, sizeof(sym_name), "%s%s", | ||
882 | MODULE_SYMBOL_PREFIX, obsparm[i].name); | ||
883 | |||
884 | kp[i].name = obsparm[i].name; | ||
885 | kp[i].perm = 000; | ||
886 | kp[i].set = set_obsolete; | ||
887 | kp[i].get = NULL; | ||
888 | obsparm[i].addr | ||
889 | = (void *)find_local_symbol(sechdrs, symindex, strtab, | ||
890 | sym_name); | ||
891 | if (!obsparm[i].addr) { | ||
892 | printk("%s: falsely claims to have parameter %s\n", | ||
893 | name, obsparm[i].name); | ||
894 | ret = -EINVAL; | ||
895 | goto out; | ||
896 | } | ||
897 | kp[i].arg = &obsparm[i]; | ||
898 | } | ||
899 | |||
900 | ret = parse_args(name, args, kp, num, NULL); | ||
901 | out: | ||
902 | kfree(kp); | ||
903 | return ret; | ||
904 | } | ||
905 | #else | ||
906 | static int obsolete_params(const char *name, | ||
907 | char *args, | ||
908 | struct obsolete_modparm obsparm[], | ||
909 | unsigned int num, | ||
910 | Elf_Shdr *sechdrs, | ||
911 | unsigned int symindex, | ||
912 | const char *strtab) | ||
913 | { | ||
914 | if (num != 0) | ||
915 | printk(KERN_WARNING "%s: Ignoring obsolete parameters\n", | ||
916 | name); | ||
917 | return 0; | ||
918 | } | ||
919 | #endif /* CONFIG_OBSOLETE_MODPARM */ | ||
920 | |||
921 | static const char vermagic[] = VERMAGIC_STRING; | 770 | static const char vermagic[] = VERMAGIC_STRING; |
922 | 771 | ||
923 | #ifdef CONFIG_MODVERSIONS | 772 | #ifdef CONFIG_MODVERSIONS |
@@ -1874,27 +1723,17 @@ static struct module *load_module(void __user *umod, | |||
1874 | set_fs(old_fs); | 1723 | set_fs(old_fs); |
1875 | 1724 | ||
1876 | mod->args = args; | 1725 | mod->args = args; |
1877 | if (obsparmindex) { | 1726 | if (obsparmindex) |
1878 | err = obsolete_params(mod->name, mod->args, | 1727 | printk(KERN_WARNING "%s: Ignoring obsolete parameters\n", |
1879 | (struct obsolete_modparm *) | 1728 | mod->name); |
1880 | sechdrs[obsparmindex].sh_addr, | 1729 | |
1881 | sechdrs[obsparmindex].sh_size | 1730 | /* Size of section 0 is 0, so this works well if no params */ |
1882 | / sizeof(struct obsolete_modparm), | 1731 | err = parse_args(mod->name, mod->args, |
1883 | sechdrs, symindex, | 1732 | (struct kernel_param *) |
1884 | (char *)sechdrs[strindex].sh_addr); | 1733 | sechdrs[setupindex].sh_addr, |
1885 | if (setupindex) | 1734 | sechdrs[setupindex].sh_size |
1886 | printk(KERN_WARNING "%s: Ignoring new-style " | 1735 | / sizeof(struct kernel_param), |
1887 | "parameters in presence of obsolete ones\n", | 1736 | NULL); |
1888 | mod->name); | ||
1889 | } else { | ||
1890 | /* Size of section 0 is 0, so this works well if no params */ | ||
1891 | err = parse_args(mod->name, mod->args, | ||
1892 | (struct kernel_param *) | ||
1893 | sechdrs[setupindex].sh_addr, | ||
1894 | sechdrs[setupindex].sh_size | ||
1895 | / sizeof(struct kernel_param), | ||
1896 | NULL); | ||
1897 | } | ||
1898 | if (err < 0) | 1737 | if (err < 0) |
1899 | goto arch_cleanup; | 1738 | goto arch_cleanup; |
1900 | 1739 | ||
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index 9a1fa8894b95..b4b362b5baf5 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c | |||
@@ -54,15 +54,15 @@ static int verbose; /* Print more debug info. */ | |||
54 | static int test_no_idle_hz; /* Test RCU's support for tickless idle CPUs. */ | 54 | static int test_no_idle_hz; /* Test RCU's support for tickless idle CPUs. */ |
55 | static int shuffle_interval = 5; /* Interval between shuffles (in sec)*/ | 55 | static int shuffle_interval = 5; /* Interval between shuffles (in sec)*/ |
56 | 56 | ||
57 | MODULE_PARM(nreaders, "i"); | 57 | module_param(nreaders, int, 0); |
58 | MODULE_PARM_DESC(nreaders, "Number of RCU reader threads"); | 58 | MODULE_PARM_DESC(nreaders, "Number of RCU reader threads"); |
59 | MODULE_PARM(stat_interval, "i"); | 59 | module_param(stat_interval, int, 0); |
60 | MODULE_PARM_DESC(stat_interval, "Number of seconds between stats printk()s"); | 60 | MODULE_PARM_DESC(stat_interval, "Number of seconds between stats printk()s"); |
61 | MODULE_PARM(verbose, "i"); | 61 | module_param(verbose, bool, 0); |
62 | MODULE_PARM_DESC(verbose, "Enable verbose debugging printk()s"); | 62 | MODULE_PARM_DESC(verbose, "Enable verbose debugging printk()s"); |
63 | MODULE_PARM(test_no_idle_hz, "i"); | 63 | module_param(test_no_idle_hz, bool, 0); |
64 | MODULE_PARM_DESC(test_no_idle_hz, "Test support for tickless idle CPUs"); | 64 | MODULE_PARM_DESC(test_no_idle_hz, "Test support for tickless idle CPUs"); |
65 | MODULE_PARM(shuffle_interval, "i"); | 65 | module_param(shuffle_interval, int, 0); |
66 | MODULE_PARM_DESC(shuffle_interval, "Number of seconds between shuffles"); | 66 | MODULE_PARM_DESC(shuffle_interval, "Number of seconds between shuffles"); |
67 | #define TORTURE_FLAG "rcutorture: " | 67 | #define TORTURE_FLAG "rcutorture: " |
68 | #define PRINTK_STRING(s) \ | 68 | #define PRINTK_STRING(s) \ |
diff --git a/sound/oss/au1000.c b/sound/oss/au1000.c index fe54de25aafc..eacb0aef21e1 100644 --- a/sound/oss/au1000.c +++ b/sound/oss/au1000.c | |||
@@ -100,7 +100,7 @@ | |||
100 | 100 | ||
101 | /* Boot options */ | 101 | /* Boot options */ |
102 | static int vra = 0; // 0 = no VRA, 1 = use VRA if codec supports it | 102 | static int vra = 0; // 0 = no VRA, 1 = use VRA if codec supports it |
103 | MODULE_PARM(vra, "i"); | 103 | module_param(vra, bool, 0); |
104 | MODULE_PARM_DESC(vra, "if 1 use VRA if codec supports it"); | 104 | MODULE_PARM_DESC(vra, "if 1 use VRA if codec supports it"); |
105 | 105 | ||
106 | 106 | ||
diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index 6a4956b8025d..c1168fae6be6 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c | |||
@@ -79,7 +79,7 @@ | |||
79 | * 0 = no VRA, 1 = use VRA if codec supports it | 79 | * 0 = no VRA, 1 = use VRA if codec supports it |
80 | */ | 80 | */ |
81 | static int vra = 1; | 81 | static int vra = 1; |
82 | MODULE_PARM(vra, "i"); | 82 | module_param(vra, bool, 0); |
83 | MODULE_PARM_DESC(vra, "if 1 use VRA if codec supports it"); | 83 | MODULE_PARM_DESC(vra, "if 1 use VRA if codec supports it"); |
84 | 84 | ||
85 | static struct au1550_state { | 85 | static struct au1550_state { |
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index c9302a1e515b..87bd3100aef3 100644 --- a/sound/oss/dmasound/dmasound_core.c +++ b/sound/oss/dmasound/dmasound_core.c | |||
@@ -195,18 +195,18 @@ | |||
195 | */ | 195 | */ |
196 | 196 | ||
197 | int dmasound_catchRadius = 0; | 197 | int dmasound_catchRadius = 0; |
198 | MODULE_PARM(dmasound_catchRadius, "i"); | 198 | module_param(dmasound_catchRadius, int, 0); |
199 | 199 | ||
200 | static unsigned int numWriteBufs = DEFAULT_N_BUFFERS; | 200 | static unsigned int numWriteBufs = DEFAULT_N_BUFFERS; |
201 | MODULE_PARM(numWriteBufs, "i"); | 201 | module_param(numWriteBufs, int, 0); |
202 | static unsigned int writeBufSize = DEFAULT_BUFF_SIZE ; /* in bytes */ | 202 | static unsigned int writeBufSize = DEFAULT_BUFF_SIZE ; /* in bytes */ |
203 | MODULE_PARM(writeBufSize, "i"); | 203 | module_param(writeBufSize, int, 0); |
204 | 204 | ||
205 | #ifdef HAS_RECORD | 205 | #ifdef HAS_RECORD |
206 | static unsigned int numReadBufs = DEFAULT_N_BUFFERS; | 206 | static unsigned int numReadBufs = DEFAULT_N_BUFFERS; |
207 | MODULE_PARM(numReadBufs, "i"); | 207 | module_param(numReadBufs, int, 0); |
208 | static unsigned int readBufSize = DEFAULT_BUFF_SIZE; /* in bytes */ | 208 | static unsigned int readBufSize = DEFAULT_BUFF_SIZE; /* in bytes */ |
209 | MODULE_PARM(readBufSize, "i"); | 209 | module_param(readBufSize, int, 0); |
210 | #endif | 210 | #endif |
211 | 211 | ||
212 | MODULE_LICENSE("GPL"); | 212 | MODULE_LICENSE("GPL"); |
diff --git a/sound/oss/ite8172.c b/sound/oss/ite8172.c index ffcb910f5c3e..00ac1c95a429 100644 --- a/sound/oss/ite8172.c +++ b/sound/oss/ite8172.c | |||
@@ -1968,9 +1968,9 @@ static int i2s_fmt[NR_DEVICE]; | |||
1968 | 1968 | ||
1969 | static unsigned int devindex; | 1969 | static unsigned int devindex; |
1970 | 1970 | ||
1971 | MODULE_PARM(spdif, "1-" __MODULE_STRING(NR_DEVICE) "i"); | 1971 | module_param_array(spdif, int, NULL, 0); |
1972 | MODULE_PARM_DESC(spdif, "if 1 the S/PDIF digital output is enabled"); | 1972 | MODULE_PARM_DESC(spdif, "if 1 the S/PDIF digital output is enabled"); |
1973 | MODULE_PARM(i2s_fmt, "1-" __MODULE_STRING(NR_DEVICE) "i"); | 1973 | module_param_array(i2s_fmt, int, NULL, 0); |
1974 | MODULE_PARM_DESC(i2s_fmt, "the format of I2S"); | 1974 | MODULE_PARM_DESC(i2s_fmt, "the format of I2S"); |
1975 | 1975 | ||
1976 | MODULE_AUTHOR("Monta Vista Software, stevel@mvista.com"); | 1976 | MODULE_AUTHOR("Monta Vista Software, stevel@mvista.com"); |
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c index dce9016cbcfd..eb5ea32fd1b0 100644 --- a/sound/oss/swarm_cs4297a.c +++ b/sound/oss/swarm_cs4297a.c | |||
@@ -154,8 +154,8 @@ static void start_adc(struct cs4297a_state *s); | |||
154 | #if CSDEBUG | 154 | #if CSDEBUG |
155 | static unsigned long cs_debuglevel = 4; // levels range from 1-9 | 155 | static unsigned long cs_debuglevel = 4; // levels range from 1-9 |
156 | static unsigned long cs_debugmask = CS_INIT /*| CS_IOCTL*/; | 156 | static unsigned long cs_debugmask = CS_INIT /*| CS_IOCTL*/; |
157 | MODULE_PARM(cs_debuglevel, "i"); | 157 | module_param(cs_debuglevel, int, 0); |
158 | MODULE_PARM(cs_debugmask, "i"); | 158 | module_param(cs_debugmask, int, 0); |
159 | #endif | 159 | #endif |
160 | #define CS_TRUE 1 | 160 | #define CS_TRUE 1 |
161 | #define CS_FALSE 0 | 161 | #define CS_FALSE 0 |
diff --git a/sound/oss/waveartist.c b/sound/oss/waveartist.c index 99d04ad3ca13..afcb524a40eb 100644 --- a/sound/oss/waveartist.c +++ b/sound/oss/waveartist.c | |||
@@ -2028,8 +2028,8 @@ __setup("waveartist=", setup_waveartist); | |||
2028 | #endif | 2028 | #endif |
2029 | 2029 | ||
2030 | MODULE_DESCRIPTION("Rockwell WaveArtist RWA-010 sound driver"); | 2030 | MODULE_DESCRIPTION("Rockwell WaveArtist RWA-010 sound driver"); |
2031 | MODULE_PARM(io, "i"); /* IO base */ | 2031 | module_param(io, int, 0); /* IO base */ |
2032 | MODULE_PARM(irq, "i"); /* IRQ */ | 2032 | module_param(irq, int, 0); /* IRQ */ |
2033 | MODULE_PARM(dma, "i"); /* DMA */ | 2033 | module_param(dma, int, 0); /* DMA */ |
2034 | MODULE_PARM(dma2, "i"); /* DMA2 */ | 2034 | module_param(dma2, int, 0); /* DMA2 */ |
2035 | MODULE_LICENSE("GPL"); | 2035 | MODULE_LICENSE("GPL"); |