Name: Parameter Changes: Drivers Depends: Module/param.patch.gz Author: Rusty Russell D: This replaces all the occurrances of __setup and MODULE_PARM in the D: drivers (other than networking) with the new PARAM calls. diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/acorn/scsi/cumana_2.c tmp2/drivers/acorn/scsi/cumana_2.c --- tmp/drivers/acorn/scsi/cumana_2.c Tue Nov 6 11:41:29 2001 +++ tmp2/drivers/acorn/scsi/cumana_2.c Thu Nov 22 18:55:23 2001 @@ -598,7 +598,7 @@ MODULE_AUTHOR("Russell King"); MODULE_DESCRIPTION("Cumana SCSI-2 driver for Acorn machines"); -MODULE_PARM(term, "1-8i"); +PARAM_ARRAY(term, term, int, 1, 8, S_IRUGO); MODULE_PARM_DESC(term, "SCSI bus termination"); MODULE_LICENSE("GPL"); EXPORT_NO_SYMBOLS; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/acorn/scsi/eesox.c tmp2/drivers/acorn/scsi/eesox.c --- tmp/drivers/acorn/scsi/eesox.c Tue Nov 6 11:41:29 2001 +++ tmp2/drivers/acorn/scsi/eesox.c Thu Nov 22 18:55:23 2001 @@ -600,7 +600,7 @@ MODULE_AUTHOR("Russell King"); MODULE_DESCRIPTION("EESOX 'Fast' SCSI driver for Acorn machines"); -MODULE_PARM(term, "1-8i"); +PARAM_ARRAY(term, term, int, 1, 8, S_IRUGO); MODULE_PARM_DESC(term, "SCSI bus termination"); MODULE_LICENSE("GPL"); EXPORT_NO_SYMBOLS; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/acorn/scsi/powertec.c tmp2/drivers/acorn/scsi/powertec.c --- tmp/drivers/acorn/scsi/powertec.c Tue Nov 6 11:41:29 2001 +++ tmp2/drivers/acorn/scsi/powertec.c Thu Nov 22 18:55:23 2001 @@ -500,7 +500,7 @@ MODULE_AUTHOR("Russell King"); MODULE_DESCRIPTION("Powertec SCSI driver"); -MODULE_PARM(term, "1-8i"); +PARAM_ARRAY(term, term, int, 1, 8, S_IRUGO); MODULE_PARM_DESC(term, "SCSI bus termination"); MODULE_LICENSE("GPL"); EXPORT_NO_SYMBOLS; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/acpi/driver.c tmp2/drivers/acpi/driver.c --- tmp/drivers/acpi/driver.c Tue Nov 6 11:41:29 2001 +++ tmp2/drivers/acpi/driver.c Thu Nov 22 18:55:23 2001 @@ -201,8 +201,7 @@ module_init(acpi_init); module_exit(acpi_exit); -#ifndef MODULE -static int __init acpi_setup(char *str) { +static int __init acpi_setup(char *str, struct kernel_param *kp) { while (str && *str) { if (strncmp(str, "off", 3) == 0) acpi_disabled = 1; @@ -210,8 +209,7 @@ if (str) str += strspn(str, ", \t"); } - return 1; + return 0; } -__setup("acpi=", acpi_setup); -#endif +PARAM_CALL(acpi, acpi_setup, NULL); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/acpi/ospm/thermal/tz_osl.c tmp2/drivers/acpi/ospm/thermal/tz_osl.c --- tmp/drivers/acpi/ospm/thermal/tz_osl.c Tue Nov 6 11:41:32 2001 +++ tmp2/drivers/acpi/ospm/thermal/tz_osl.c Thu Nov 22 18:55:23 2001 @@ -37,7 +37,7 @@ MODULE_DESCRIPTION("ACPI Component Architecture (CA) - Thermal Zone Driver"); int TZP = 0; -MODULE_PARM(TZP, "i"); +PARAM(TZP, int, S_IRUGO); MODULE_PARM_DESC(TZP, "Thermal zone polling frequency, in 1/10 seconds.\n"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/atm/ambassador.c tmp2/drivers/atm/ambassador.c --- tmp/drivers/atm/ambassador.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/atm/ambassador.c Thu Nov 22 18:55:23 2001 @@ -322,7 +322,7 @@ static unsigned int rxs[NUM_RX_POOLS] = { 64, 64, 64, 64 }; static unsigned int rxs_bs[NUM_RX_POOLS] = { 4080, 12240, 36720, 65535 }; static unsigned int rx_lats = 7; -static unsigned char pci_lat = 0; +static unsigned int pci_lat = 0; static const unsigned long onegigmask = -1 << 30; @@ -2586,13 +2586,13 @@ MODULE_AUTHOR(maintainer_string); MODULE_DESCRIPTION(description_string); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "h"); -MODULE_PARM(cmds, "i"); -MODULE_PARM(txs, "i"); -MODULE_PARM(rxs, __MODULE_STRING(NUM_RX_POOLS) "i"); -MODULE_PARM(rxs_bs, __MODULE_STRING(NUM_RX_POOLS) "i"); -MODULE_PARM(rx_lats, "i"); -MODULE_PARM(pci_lat, "b"); +PARAM(debug, short, S_IWUSR|S_IRUGO); +PARAM(cmds, int, S_IRUGO); +PARAM(txs, int, S_IRUGO); +PARAM_ARRAY(rxs, rxs, int, 1, NUM_RX_POOLS, S_IRUGO); +PARAM_ARRAY(rxs_bs, rxs_bs, int, 1, NUM_RX_POOLS, S_IRUGO); +PARAM(rx_lats, int, S_IRUGO); +PARAM(pci_lat, int, S_IRUGO); MODULE_PARM_DESC(debug, "debug bitmap, see .h file"); MODULE_PARM_DESC(cmds, "number of command queue entries"); MODULE_PARM_DESC(txs, "number of TX queue entries"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/atm/firestream.c tmp2/drivers/atm/firestream.c --- tmp/drivers/atm/firestream.c Thu Nov 22 18:18:35 2001 +++ tmp2/drivers/atm/firestream.c Thu Nov 22 18:55:23 2001 @@ -306,11 +306,11 @@ #ifdef MODULE #ifdef DEBUG -MODULE_PARM(fs_debug, "i"); +PARAM(fs_debug, int, 000); #endif -MODULE_PARM(loopback, "i"); -MODULE_PARM(num, "i"); -MODULE_PARM(fs_keystream, "i"); +PARAM(loopback, int, 000); +PARAM(num, int, 000); +PARAM(fs_keystream, int, 000); /* XXX Add rx_buf_sizes, and rx_pool_sizes As per request Amar. -- REW */ #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/atm/horizon.c tmp2/drivers/atm/horizon.c --- tmp/drivers/atm/horizon.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/atm/horizon.c Thu Nov 22 18:55:23 2001 @@ -361,7 +361,7 @@ static unsigned short vpi_bits = 0; static unsigned short max_tx_size = 9000; static unsigned short max_rx_size = 9000; -static unsigned char pci_lat = 0; +static unsigned short pci_lat = 0; /********** access functions **********/ @@ -2936,11 +2936,11 @@ MODULE_AUTHOR(maintainer_string); MODULE_DESCRIPTION(description_string); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "h"); -MODULE_PARM(vpi_bits, "h"); -MODULE_PARM(max_tx_size, "h"); -MODULE_PARM(max_rx_size, "h"); -MODULE_PARM(pci_lat, "b"); +PARAM(debug, short, 000); +PARAM(vpi_bits, short, 000); +PARAM(max_tx_size, short, 000); +PARAM(max_rx_size, short, 000); +PARAM(pci_lat, short, 000); MODULE_PARM_DESC(debug, "debug bitmap, see .h file"); MODULE_PARM_DESC(vpi_bits, "number of bits (0..4) to allocate to VPIs"); MODULE_PARM_DESC(max_tx_size, "maximum size of TX AAL5 frames"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/atm/iphase.c tmp2/drivers/atm/iphase.c --- tmp/drivers/atm/iphase.c Tue Sep 18 15:52:34 2001 +++ tmp2/drivers/atm/iphase.c Thu Nov 22 18:55:23 2001 @@ -90,11 +90,11 @@ |IF_IADBG_ABR | IF_IADBG_EVENT*/ 0; #ifdef MODULE -MODULE_PARM(IA_TX_BUF, "i"); -MODULE_PARM(IA_TX_BUF_SZ, "i"); -MODULE_PARM(IA_RX_BUF, "i"); -MODULE_PARM(IA_RX_BUF_SZ, "i"); -MODULE_PARM(IADebugFlag, "i"); +PARAM(IA_TX_BUF, int, 000); +PARAM(IA_TX_BUF_SZ, int, 000); +PARAM(IA_RX_BUF, int, 000); +PARAM(IA_RX_BUF_SZ, int, 000); +PARAM(IADebugFlag, int, 000); #endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/atm/nicstar.c tmp2/drivers/atm/nicstar.c --- tmp/drivers/atm/nicstar.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/atm/nicstar.c Thu Nov 22 18:55:23 2001 @@ -270,7 +270,7 @@ }; static struct timer_list ns_timer; static char *mac[NS_MAX_CARDS]; -MODULE_PARM(mac, "1-" __MODULE_STRING(NS_MAX_CARDS) "s"); +PARAM_ARRAY(mac, mac, charp, 1, NS_MAX_CARDS, S_IRUGO); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/block/amiflop.c tmp2/drivers/block/amiflop.c --- tmp/drivers/block/amiflop.c Tue Nov 6 11:41:32 2001 +++ tmp2/drivers/block/amiflop.c Thu Nov 22 18:55:23 2001 @@ -117,7 +117,7 @@ static long int fd_def_df0 = FD_DD_3; /* default for df0 if it doesn't identify */ -MODULE_PARM(fd_def_df0,"l"); +PARAM(fd_def_df0, long, 000); MODULE_LICENSE("GPL"); /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/block/ataflop.c tmp2/drivers/block/ataflop.c --- tmp/drivers/block/ataflop.c Tue Nov 6 11:41:32 2001 +++ tmp2/drivers/block/ataflop.c Thu Nov 22 18:55:23 2001 @@ -285,7 +285,7 @@ static unsigned long PhysDMABuffer; /* physical address */ static int UseTrackbuffer = -1; /* Do track buffering? */ -MODULE_PARM(UseTrackbuffer, "i"); +PARAM(UseTrackbuffer, int, 000); unsigned char *TrackBuffer; /* buffer for reads */ static unsigned long PhysTrackBuffer; /* physical address */ @@ -310,7 +310,7 @@ static int IsFormatting = 0, FormatError; static int UserSteprate[FD_MAX_UNITS] = { -1, -1 }; -MODULE_PARM(UserSteprate, "1-" __MODULE_STRING(FD_MAX_UNITS) "i"); +PARAM_ARRAY(UserSteprate, UserSteprate, int, 1, FD_MAX_UNITS, 000); /* Synchronization of FDC access. */ static volatile int fdc_busy = 0; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/block/cpqarray.c tmp2/drivers/block/cpqarray.c --- tmp/drivers/block/cpqarray.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/block/cpqarray.c Thu Nov 22 18:55:23 2001 @@ -297,10 +297,9 @@ } #endif /* CONFIG_PROC_FS */ -#ifdef MODULE +PARAM_ARRAY(eisa, eisa, int, 1, 8, S_IRUGO); -MODULE_PARM(eisa, "1-8i"); -EXPORT_NO_SYMBOLS; +#ifdef MODULE /* This is a bit of a hack... */ int __init init_module(void) @@ -726,38 +725,6 @@ return (page_remapped ? (page_remapped + page_offs) : NULL); } - -#ifndef MODULE -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13) -/* - * Config string is a comma seperated set of i/o addresses of EISA cards. - */ -static int cpqarray_setup(char *str) -{ - int i, ints[9]; - - (void)get_options(str, ARRAY_SIZE(ints), ints); - - for(i=0; i #include #include +#include #include @@ -164,14 +165,14 @@ #endif -MODULE_PARM(verbose,"i"); -MODULE_PARM(major,"i"); -MODULE_PARM(name,"s"); -MODULE_PARM(nice,"i"); -MODULE_PARM(drive0,"1-6i"); -MODULE_PARM(drive1,"1-6i"); -MODULE_PARM(drive2,"1-6i"); -MODULE_PARM(drive3,"1-6i"); +PARAM(verbose, int, 000); +PARAM(major, int, 000); +PARAM(name, charp, 000); +PARAM(nice, int, 000); +PARAM_ARRAY(drive0, drive0, int, 1, 6, 000); +PARAM_ARRAY(drive1, drive1, int, 1, 6, 000); +PARAM_ARRAY(drive2, drive2, int, 1, 6, 000); +PARAM_ARRAY(drive3, drive3, int, 1, 6, 000); #include "paride.h" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/block/paride/pd.c tmp2/drivers/block/paride/pd.c --- tmp/drivers/block/paride/pd.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/block/paride/pd.c Thu Nov 22 18:55:23 2001 @@ -163,6 +163,7 @@ #include #include /* for the eject ioctl */ #include +#include #include @@ -185,15 +186,15 @@ #endif -MODULE_PARM(verbose,"i"); -MODULE_PARM(major,"i"); -MODULE_PARM(name,"s"); -MODULE_PARM(cluster,"i"); -MODULE_PARM(nice,"i"); -MODULE_PARM(drive0,"1-8i"); -MODULE_PARM(drive1,"1-8i"); -MODULE_PARM(drive2,"1-8i"); -MODULE_PARM(drive3,"1-8i"); +PARAM(verbose, int, 000); +PARAM(major, int, 000); +PARAM(name, charp, 000); +PARAM(cluster, int, 000); +PARAM(nice, int, 000); +PARAM_ARRAY(drive0, drive0, int, 1, 8, 000); +PARAM_ARRAY(drive1, drive1, int, 1, 8, 000); +PARAM_ARRAY(drive2, drive2, int, 1, 8, 000); +PARAM_ARRAY(drive3, drive3, int, 1, 8, 000); #include "paride.h" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/block/paride/pf.c tmp2/drivers/block/paride/pf.c --- tmp/drivers/block/paride/pf.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/block/paride/pf.c Thu Nov 22 18:55:23 2001 @@ -161,6 +161,7 @@ #include #include #include +#include #include @@ -183,15 +184,15 @@ #endif -MODULE_PARM(verbose,"i"); -MODULE_PARM(major,"i"); -MODULE_PARM(name,"s"); -MODULE_PARM(cluster,"i"); -MODULE_PARM(nice,"i"); -MODULE_PARM(drive0,"1-7i"); -MODULE_PARM(drive1,"1-7i"); -MODULE_PARM(drive2,"1-7i"); -MODULE_PARM(drive3,"1-7i"); +PARAM(verbose, int, 000); +PARAM(major, int, 000); +PARAM(name, charp, 000); +PARAM(cluster, int, 000); +PARAM(nice, int, 000); +PARAM_ARRAY(drive0, drive0, int, 1, 7, 000); +PARAM_ARRAY(drive1, drive1, int, 1, 7, 000); +PARAM_ARRAY(drive2, drive2, int, 1, 7, 000); +PARAM_ARRAY(drive3, drive3, int, 1, 7, 000); #include "paride.h" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/block/paride/pg.c tmp2/drivers/block/paride/pg.c --- tmp/drivers/block/paride/pg.c Fri Oct 12 02:04:57 2001 +++ tmp2/drivers/block/paride/pg.c Thu Nov 22 18:55:23 2001 @@ -172,6 +172,7 @@ #include #include #include +#include #include @@ -192,13 +193,13 @@ #endif -MODULE_PARM(verbose,"i"); -MODULE_PARM(major,"i"); -MODULE_PARM(name,"s"); -MODULE_PARM(drive0,"1-6i"); -MODULE_PARM(drive1,"1-6i"); -MODULE_PARM(drive2,"1-6i"); -MODULE_PARM(drive3,"1-6i"); +PARAM(verbose, int, 000); +PARAM(major, int, 000); +PARAM(name, charp, 000); +PARAM_ARRAY(drive0, drive0, int, 1, 6, 000); +PARAM_ARRAY(drive1, drive1, int, 1, 6, 000); +PARAM_ARRAY(drive2, drive2, int, 1, 6, 000); +PARAM_ARRAY(drive3, drive3, int, 1, 6, 000); #include "paride.h" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/block/paride/pt.c tmp2/drivers/block/paride/pt.c --- tmp/drivers/block/paride/pt.c Fri Oct 12 02:04:57 2001 +++ tmp2/drivers/block/paride/pt.c Thu Nov 22 18:55:23 2001 @@ -150,6 +150,7 @@ #include #include #include +#include #include @@ -170,13 +171,13 @@ #endif -MODULE_PARM(verbose,"i"); -MODULE_PARM(major,"i"); -MODULE_PARM(name,"s"); -MODULE_PARM(drive0,"1-6i"); -MODULE_PARM(drive1,"1-6i"); -MODULE_PARM(drive2,"1-6i"); -MODULE_PARM(drive3,"1-6i"); +PARAM(verbose, int, 000); +PARAM(major, int, 000); +PARAM(name, charp, 000); +PARAM_ARRAY(drive0, drive0, int, 1, 6, 000); +PARAM_ARRAY(drive1, drive1, int, 1, 6, 000); +PARAM_ARRAY(drive2, drive2, int, 1, 6, 000); +PARAM_ARRAY(drive3, drive3, int, 1, 6, 000); #include "paride.h" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/block/ps2esdi.c tmp2/drivers/block/ps2esdi.c --- tmp/drivers/block/ps2esdi.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/block/ps2esdi.c Thu Nov 22 18:55:23 2001 @@ -195,10 +195,10 @@ static int head[MAX_HD] = {-1, -1}; static int sect[MAX_HD] = {-1, -1}; -MODULE_PARM(tp720esdi, "i"); -MODULE_PARM(cyl, "i"); -MODULE_PARM(head, "i"); -MODULE_PARM(track, "i"); +PARAM(tp720esdi, int, 000); +PARAM(cyl, int, 000); +PARAM(head, int, 000); +PARAM(track, int, 000); MODULE_LICENSE("GPL"); int init_module(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/block/rd.c tmp2/drivers/block/rd.c --- tmp/drivers/block/rd.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/block/rd.c Thu Nov 22 18:55:23 2001 @@ -132,59 +132,22 @@ int mount_initrd = 1; /* zero if initrd should not be mounted */ int initrd_below_start_ok; -static int __init no_initrd(char *str) +static int __init no_initrd(char *str, struct kernel_param *kp) { mount_initrd = 0; - return 1; -} - -__setup("noinitrd", no_initrd); - -#endif - -static int __init ramdisk_start_setup(char *str) -{ - rd_image_start = simple_strtol(str,NULL,0); - return 1; -} - -static int __init load_ramdisk(char *str) -{ - rd_doload = simple_strtol(str,NULL,0) & 3; - return 1; -} - -static int __init prompt_ramdisk(char *str) -{ - rd_prompt = simple_strtol(str,NULL,0) & 1; - return 1; -} - -static int __init ramdisk_size(char *str) -{ - rd_size = simple_strtol(str,NULL,0); - return 1; -} - -static int __init ramdisk_size2(char *str) -{ - return ramdisk_size(str); -} - -static int __init ramdisk_blocksize(char *str) -{ - rd_blocksize = simple_strtol(str,NULL,0); - return 1; + return 0; } -__setup("ramdisk_start=", ramdisk_start_setup); -__setup("load_ramdisk=", load_ramdisk); -__setup("prompt_ramdisk=", prompt_ramdisk); -__setup("ramdisk=", ramdisk_size); -__setup("ramdisk_size=", ramdisk_size2); -__setup("ramdisk_blocksize=", ramdisk_blocksize); +PARAM_CALL(noinitrd, no_initrd, NULL); +#endif /* CONFIG_BLK_DEV_INITRD */ +PARAM_NAMED(load_ramdisk, rd_doload, int, 0); +PARAM_NAMED(prompt_ramdisk, rd_prompt, int, 0); +#endif /* !MODULE */ -#endif +PARAM_NAMED(ramdisk_start, rd_image_start, int, 0); +PARAM_NAMED(ramdisk_size, rd_size, int, 0); +PARAM_NAMED(ramdisk, rd_size, int, 0); +PARAM_NAMED(ramdisk_blocksize, rd_blocksize, int, 0); /* * Copyright (C) 2000 Linus Torvalds. @@ -540,12 +503,6 @@ module_init(rd_init); module_exit(rd_cleanup); #endif - -/* loadable module support */ -MODULE_PARM (rd_size, "1i"); -MODULE_PARM_DESC(rd_size, "Size of each RAM disk in kbytes."); -MODULE_PARM (rd_blocksize, "i"); -MODULE_PARM_DESC(rd_blocksize, "Blocksize of each RAM disk in bytes."); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/block/xd.c tmp2/drivers/block/xd.c --- tmp/drivers/block/xd.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/block/xd.c Thu Nov 22 18:55:23 2001 @@ -1094,13 +1094,6 @@ } -#ifdef MODULE -static int xd[5] = { -1,-1,-1,-1, }; - -MODULE_PARM(xd, "1-4i"); -MODULE_PARM(xd_geo, "3-6i"); -MODULE_PARM(nodma, "i"); - MODULE_LICENSE("GPL"); static void xd_done (void) @@ -1119,12 +1112,6 @@ int i,count = 0; int error; - for (i = 4; i > 0; i--) - if(((xd[i] = xd[i-1]) >= 0) && !count) - count = i; - if((xd[0] = count)) - do_xd_setup(xd); - error = xd_init(); if (error) return error; @@ -1151,19 +1138,21 @@ xd_dma_mem_free((unsigned long)xd_dma_buffer, xd_maxsectors * 0x200); } } -#else -static int __init xd_setup (char *str) +module_init(init_module); +module_exit(cleanup_module); + +static int __init xd_setup (char *str, struct kernel_param *kp) { int ints[5]; get_options (str, ARRAY_SIZE (ints), ints); do_xd_setup (ints); - return 1; + return 0; } /* xd_manual_geo_init: initialise drive geometry from command line parameters (used only for WD drives) */ -static int __init xd_manual_geo_init (char *str) +static int __init xd_manual_geo_init (char *str, struct kernel_param *kp) { int i, integers[1 + 3*XD_MAXDRIVES]; @@ -1174,11 +1163,9 @@ } for (i = 0; (i < integers[0]) && (i < 3*XD_MAXDRIVES); i++) xd_geo[i] = integers[i+1]; - return 1; + return 0; } -__setup ("xd=", xd_setup); -__setup ("xd_geo=", xd_manual_geo_init); - -#endif /* MODULE */ - +PARAM_CALL(xd, xd_setup, NULL); +PARAM_CALL(xd_geo, xd_manual_geo_init, NULL); +PARAM(nodma, bool, 000); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/cdrom/aztcd.c tmp2/drivers/cdrom/aztcd.c --- tmp/drivers/cdrom/aztcd.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/cdrom/aztcd.c Thu Nov 22 18:55:23 2001 @@ -285,7 +285,7 @@ static int azt_port = AZT_BASE_ADDR; -MODULE_PARM(azt_port, "i"); +PARAM(azt_port, int, 000); static int azt_port_auto[16] = AZT_BASE_AUTO; @@ -1140,7 +1140,7 @@ */ #ifndef MODULE -static int __init aztcd_setup(char *str) +static int __init aztcd_setup(char *str, struct kernel_param *kp) { int ints[4]; @@ -1150,10 +1150,10 @@ azt_port = ints[1]; if (ints[1] > 1) azt_cont = ints[2]; - return 1; + return 0; } -__setup("aztcd=", aztcd_setup); +PARAM_CALL(aztcd, aztcd_setup, NULL); #endif /* !MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/cdrom/cdrom.c tmp2/drivers/cdrom/cdrom.c --- tmp/drivers/cdrom/cdrom.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/cdrom/cdrom.c Thu Nov 22 18:55:23 2001 @@ -279,11 +279,12 @@ static int lockdoor = 1; /* will we ever get to use this... sigh. */ static int check_media_type; -MODULE_PARM(debug, "i"); -MODULE_PARM(autoclose, "i"); -MODULE_PARM(autoeject, "i"); -MODULE_PARM(lockdoor, "i"); -MODULE_PARM(check_media_type, "i"); + +PARAM(debug, int, S_IRUGO|S_IWUSR); +PARAM(autoclose, int, S_IRUGO|S_IWUSR); +PARAM(autoeject, int, S_IRUGO|S_IWUSR); +PARAM(lockdoor, int, S_IRUGO|S_IWUSR); +PARAM(check_media_type, int, S_IRUGO|S_IWUSR); #if (ERRLOGMASK!=CD_NOTHING) #define cdinfo(type, fmt, args...) \ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/cdrom/cdu31a.c tmp2/drivers/cdrom/cdu31a.c --- tmp/drivers/cdrom/cdu31a.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/cdrom/cdu31a.c Thu Nov 22 18:55:23 2001 @@ -222,7 +222,7 @@ /* The base I/O address of the Sony Interface. This is a variable (not a #define) so it can be easily changed via some future ioctl() */ static unsigned int cdu31a_port = 0; -MODULE_PARM(cdu31a_port, "i"); +PARAM(cdu31a_port, int, 000); /* * The following are I/O addresses of the various registers for the drive. The @@ -299,7 +299,7 @@ /* What IRQ is the drive using? 0 if none. */ static int cdu31a_irq = 0; -MODULE_PARM(cdu31a_irq, "i"); +PARAM(cdu31a_irq, int, 000); /* The interrupt handler will wake this queue up when it gets an interrupts. */ @@ -3286,7 +3286,7 @@ */ -static int __init cdu31a_setup(char *strings) +static int __init cdu31a_setup(char *strings, struct kernel_param *kp) { int ints[4]; @@ -3310,7 +3310,7 @@ return 1; } -__setup("cdu31a=", cdu31a_setup); +PARAM_CALL(cdu31a, cdu31a_setup, NULL); #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/cdrom/cm206.c tmp2/drivers/cdrom/cm206.c --- tmp/drivers/cdrom/cm206.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/cdrom/cm206.c Thu Nov 22 18:55:23 2001 @@ -219,10 +219,10 @@ static int cm206[2] = { 0, 0 }; /* for compatible `insmod' parameter passing */ #endif -MODULE_PARM(cm206_base, "i"); /* base */ -MODULE_PARM(cm206_irq, "i"); /* irq */ -MODULE_PARM(cm206, "1-2i"); /* base,irq or irq,base */ -MODULE_PARM(auto_probe, "i"); /* auto probe base and irq */ +PARAM(cm206_base, int, 000); /* base */ +PARAM(cm206_irq, int, 000); /* irq */ +PARAM_ARRAY(cm206, cm206, int, 1, 2, 000); /* base,irq or irq,base */ +PARAM(auto_probe, int, 000); /* auto probe base and irq */ MODULE_LICENSE("GPL"); #define POLLOOP 100 /* milliseconds */ @@ -1556,7 +1556,7 @@ /* This setup function accepts either `auto' or numbers in the range * 3--11 (for irq) or 0x300--0x370 (for base port) or both. */ -static int __init cm206_setup(char *s) +static int __init cm206_setup(char *s, struct kernel_param *kp) { int i, p[4]; @@ -1576,7 +1576,7 @@ return 1; } -__setup("cm206=", cm206_setup); +PARAM_CALL("cm206", cm206_setup, NULL); #endif /* !MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/cdrom/gscd.c tmp2/drivers/cdrom/gscd.c --- tmp/drivers/cdrom/gscd.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/cdrom/gscd.c Thu Nov 22 18:55:23 2001 @@ -81,7 +81,7 @@ static unsigned char gscd_buf[2048]; /* buffer for block size conversion */ static int gscd_bn = -1; static short gscd_port = GSCD_BASE_ADDR; -MODULE_PARM(gscd, "h"); +PARAM(gscd, short, 000); /* Kommt spaeter vielleicht noch mal dran ... * static DECLARE_WAIT_QUEUE_HEAD(gscd_waitq); @@ -194,24 +194,6 @@ return 0; } - -#ifndef MODULE -/* Using new interface for kernel-parameters */ - -static int __init gscd_setup(char *str) -{ - int ints[2]; - (void) get_options(str, ARRAY_SIZE(ints), ints); - - if (ints[0] > 0) { - gscd_port = ints[1]; - } - return 1; -} - -__setup("gscd=", gscd_setup); - -#endif static int gscd_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/cdrom/isp16.c tmp2/drivers/cdrom/isp16.c --- tmp/drivers/cdrom/isp16.c Sat Sep 8 02:28:38 2001 +++ tmp2/drivers/cdrom/isp16.c Thu Nov 22 18:55:23 2001 @@ -68,10 +68,10 @@ static int isp16_cdrom_dma = ISP16_CDROM_DMA; static char *isp16_cdrom_type = ISP16_CDROM_TYPE; -MODULE_PARM(isp16_cdrom_base, "i"); -MODULE_PARM(isp16_cdrom_irq, "i"); -MODULE_PARM(isp16_cdrom_dma, "i"); -MODULE_PARM(isp16_cdrom_type, "s"); +PARAM(isp16_cdrom_base, int, 000); +PARAM(isp16_cdrom_irq, int, 000); +PARAM(isp16_cdrom_dma, int, 000); +PARAM(isp16_cdrom_type, charp, 000); #ifdef MODULE void isp16_exit(void); @@ -79,30 +79,6 @@ #define ISP16_IN(p) (outb(isp16_ctrl,ISP16_CTRL_PORT), inb(p)) #define ISP16_OUT(p,b) (outb(isp16_ctrl,ISP16_CTRL_PORT), outb(b,p)) - -#ifndef MODULE - -static int -__init isp16_setup(char *str) -{ - int ints[4]; - - (void) get_options(str, ARRAY_SIZE(ints), ints); - if (ints[0] > 0) - isp16_cdrom_base = ints[1]; - if (ints[0] > 1) - isp16_cdrom_irq = ints[2]; - if (ints[0] > 2) - isp16_cdrom_dma = ints[3]; - if (str) - isp16_cdrom_type = str; - - return 1; -} - -__setup("isp16=", isp16_setup); - -#endif /* MODULE */ /* * ISP16 initialisation. diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/cdrom/mcd.c tmp2/drivers/cdrom/mcd.c --- tmp/drivers/cdrom/mcd.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/cdrom/mcd.c Thu Nov 22 18:55:23 2001 @@ -153,7 +153,7 @@ static short mcd_port = CONFIG_MCD_BASE; /* used as "mcd" by "insmod" */ static int mcd_irq = CONFIG_MCD_IRQ; /* must directly follow mcd_port */ -MODULE_PARM(mcd, "1-2i"); +PARAM(mcd, short, 000); static int McdTimeout, McdTries; static DECLARE_WAIT_QUEUE_HEAD(mcd_waitq); @@ -217,27 +217,6 @@ capacity:1, name:"mcd", }; - -#ifndef MODULE -static int __init mcd_setup(char *str) -{ - int ints[9]; - - (void) get_options(str, ARRAY_SIZE(ints), ints); - - if (ints[0] > 0) - mcd_port = ints[1]; - if (ints[0] > 1) - mcd_irq = ints[2]; - if (ints[0] > 2) - mitsumi_bug_93_wait = ints[3]; - - return 1; -} - -__setup("mcd=", mcd_setup); - -#endif /* MODULE */ static int mcd_media_changed(struct cdrom_device_info *cdi, int disc_nr) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/cdrom/mcdx.c tmp2/drivers/cdrom/mcdx.c --- tmp/drivers/cdrom/mcdx.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/cdrom/mcdx.c Thu Nov 22 18:55:23 2001 @@ -291,7 +291,8 @@ static struct s_drive_stuff *mcdx_irq_map[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -MODULE_PARM(mcdx, "1-4i"); +/* Is this wrong? --RR */ +PARAM_ARRAY(mcdx, mcdx[0], int, 1, 4, 000); static struct cdrom_device_ops mcdx_dops = { open:mcdx_open, @@ -814,23 +815,6 @@ stuffp->yyy = 0; return 1; } - -#ifndef MODULE -static int __init mcdx_setup(char *str) -{ - int pi[4]; - (void) get_options(str, ARRAY_SIZE(pi), pi); - - if (pi[0] > 0) - mcdx_drive_map[0][0] = pi[1]; - if (pi[0] > 1) - mcdx_drive_map[0][1] = pi[2]; - return 1; -} - -__setup("mcdx=", mcdx_setup); - -#endif /* DIRTY PART ******************************************************/ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/cdrom/optcd.c tmp2/drivers/cdrom/optcd.c --- tmp/drivers/cdrom/optcd.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/cdrom/optcd.c Thu Nov 22 18:55:23 2001 @@ -118,7 +118,7 @@ #define optcd_port optcd /* Needed for the modutils. */ static short optcd_port = OPTCD_PORTBASE; /* I/O base of drive. */ -MODULE_PARM(optcd_port, "h"); +PARAM(optcd_port, short, 000); /* Drive registers, read */ #define DATA_PORT optcd_port /* Read data/status */ #define STATUS_PORT optcd_port+1 /* Indicate data/status availability */ @@ -2007,23 +2007,6 @@ ioctl: opt_ioctl, check_media_change: opt_media_change, }; - -#ifndef MODULE -/* Get kernel parameter when used as a kernel driver */ -static int optcd_setup(char *str) -{ - int ints[4]; - (void)get_options(str, ARRAY_SIZE(ints), ints); - - if (ints[0] > 0) - optcd_port = ints[1]; - - return 1; -} - -__setup("optcd=", optcd_setup); - -#endif /* MODULE */ /* Test for presence of drive and initialize it. Called at boot time or during module initialisation. */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/cdrom/sbpcd.c tmp2/drivers/cdrom/sbpcd.c --- tmp/drivers/cdrom/sbpcd.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/cdrom/sbpcd.c Thu Nov 22 18:55:23 2001 @@ -485,8 +485,7 @@ #else static int sbpcd[] = {CDROM_PORT, SBPRO}; /* probe with user's setup only */ #endif -MODULE_PARM(sbpcd, "2i"); -MODULE_PARM(max_drives, "i"); +PARAM_ARRAY(sbpcd, sbpcd, int, 2, 2, 000); #define NUM_PROBE (sizeof(sbpcd) / sizeof(int)) @@ -591,6 +590,7 @@ static char msgbuf[80]; static int max_drives = MAX_DRIVES; +PARAM(max_drives, int, 000); #ifndef MODULE static unsigned char setup_done; static const char *str_sb_l = "soundblaster"; @@ -5611,9 +5611,6 @@ return 1; } - -__setup("sbpcd=", sbpcd_setup); - /*==========================================================================*/ /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/cdrom/sjcd.c tmp2/drivers/cdrom/sjcd.c --- tmp/drivers/cdrom/sjcd.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/cdrom/sjcd.c Thu Nov 22 18:55:24 2001 @@ -113,7 +113,7 @@ static int sjcd_base = SJCD_BASE_ADDR; -MODULE_PARM(sjcd_base, "i"); +PARAM(sjcd_base, int, 000); static DECLARE_WAIT_QUEUE_HEAD(sjcd_waitq); @@ -158,25 +158,6 @@ #define CLEAR_TIMER del_timer( &sjcd_delay_timer ) static int sjcd_cleanup(void); - -/* - * Set up device, i.e., use command line data to set - * base address. - */ -#ifndef MODULE -static int __init sjcd_setup(char *str) -{ - int ints[2]; - (void) get_options(str, ARRAY_SIZE(ints), ints); - if (ints[0] > 0) - sjcd_base = ints[1]; - - return 1; -} - -__setup("sjcd=", sjcd_setup); - -#endif /* * Special converters. diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/cdrom/sonycd535.c tmp2/drivers/cdrom/sonycd535.c --- tmp/drivers/cdrom/sonycd535.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/cdrom/sonycd535.c Thu Nov 22 18:55:24 2001 @@ -205,7 +205,7 @@ /* The base I/O address of the Sony Interface. This is a variable (not a #define) so it can be easily changed via some future ioctl() */ static unsigned int sony535_cd_base_io = CDU535_ADDRESS; -MODULE_PARM(sony535_cd_base_io, "i"); +PARAM(sony535_cd_base_io, int, 000); /* * The following are I/O addresses of the various registers for the drive. The @@ -1644,41 +1644,6 @@ register_disk(NULL, MKDEV(MAJOR_NR,0), 1, &cdu_fops, 0); return 0; } - -#ifndef MODULE - -/* - * accept "kernel command line" parameters - * (added by emoenke@gwdg.de) - * - * use: tell LILO: - * sonycd535=0x320 - * - * the address value has to be the existing CDROM port address. - */ -static int __init -sonycd535_setup(char *strings) -{ - int ints[3]; - (void)get_options(strings, ARRAY_SIZE(ints), ints); - /* if IRQ change and default io base desired, - * then call with io base of 0 - */ - if (ints[0] > 0) - if (ints[1] != 0) - sony535_cd_base_io = ints[1]; - if (ints[0] > 1) - sony535_irq_used = ints[2]; - if ((strings != NULL) && (*strings != '\0')) - printk(CDU535_MESSAGE_NAME - ": Warning: Unknown interface type: %s\n", strings); - - return 1; -} - -__setup("sonycd535=", sonycd535_setup); - -#endif /* MODULE */ void __exit sony535_exit(void) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/adbmouse.c tmp2/drivers/char/adbmouse.c --- tmp/drivers/char/adbmouse.c Fri Oct 12 02:07:00 2001 +++ tmp2/drivers/char/adbmouse.c Thu Nov 22 18:55:24 2001 @@ -171,15 +171,13 @@ return msedev < 0 ? msedev : 0; } -#ifndef MODULE - /* * XXX this function is misnamed. * It is called if the kernel is booted with the adb_buttons=xxx * option, which is about using ADB keyboard buttons to emulate * mouse buttons. -- paulus */ -static int __init adb_mouse_setup(char *str) +static int __init adb_mouse_setup(char *str, struct kernel_param *kp) { int ints[4]; @@ -191,12 +189,10 @@ if (ints[0] >= 3) adb_button3_keycode = ints[3]; } - return 1; + return 0; } -__setup("adb_buttons=", adb_mouse_setup); - -#endif /* !MODULE */ +PARAM_CALL(adb_buttons, adb_mouse_setup, NULL); static void __exit adb_mouse_cleanup(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/agp/agpgart_be.c tmp2/drivers/char/agp/agpgart_be.c --- tmp/drivers/char/agp/agpgart_be.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/char/agp/agpgart_be.c Thu Nov 22 18:55:24 2001 @@ -48,7 +48,7 @@ #include "agp.h" MODULE_AUTHOR("Jeff Hartmann "); -MODULE_PARM(agp_try_unsupported, "1i"); +PARAM(agp_try_unsupported, int, S_IRUGO); MODULE_LICENSE("GPL and additional rights"); EXPORT_SYMBOL(agp_free_memory); EXPORT_SYMBOL(agp_allocate_memory); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/applicom.c tmp2/drivers/char/applicom.c --- tmp/drivers/char/applicom.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/char/applicom.c Thu Nov 22 18:55:24 2001 @@ -86,9 +86,9 @@ MODULE_AUTHOR("David Woodhouse & Applicom International"); MODULE_DESCRIPTION("Driver for Applicom Profibus card"); MODULE_LICENSE("GPL"); -MODULE_PARM(irq, "i"); +PARAM(irq, int, 000); MODULE_PARM_DESC(irq, "IRQ of the Applicom board"); -MODULE_PARM(mem, "i"); +PARAM(mem, int, 000); MODULE_PARM_DESC(mem, "Shared Memory Address of Applicom board"); MODULE_SUPPORTED_DEVICE("ac"); @@ -839,29 +839,3 @@ kfree(adgl); return 0; } - -#ifndef MODULE -static int __init applicom_setup(char *str) -{ - int ints[4]; - - (void) get_options(str, 4, ints); - - if (ints[0] > 2) { - printk(KERN_WARNING "Too many arguments to 'applicom=', expected mem,irq only.\n"); - } - - if (ints[0] < 2) { - printk(KERN_INFO"applicom numargs: %d\n", ints[0]); - return 0; - } - - mem = ints[1]; - irq = ints[2]; - return 1; -} - -__setup("applicom=", applicom_setup); - -#endif /* MODULE */ - diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/atarimouse.c tmp2/drivers/char/atarimouse.c --- tmp/drivers/char/atarimouse.c Sat Sep 15 07:04:07 2001 +++ tmp2/drivers/char/atarimouse.c Thu Nov 22 18:55:24 2001 @@ -34,7 +34,7 @@ static int msedev; static int mouse_threshold[2] = {2,2}; -MODULE_PARM(mouse_threshold, "2i"); +PARAM_ARRAY(mouse_threshold, mouse_threshold, int, 2, 2, S_IRUGO); extern int atari_mouse_buttons; static void atari_mouse_interrupt(char *buf) @@ -85,46 +85,6 @@ return msedev < 0 ? msedev : 0; } - -#ifndef MODULE - -#define MIN_THRESHOLD 1 -#define MAX_THRESHOLD 20 /* more seems not reasonable... */ - -static int __init atari_mouse_setup( char *str ) -{ - int ints[8]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - if (ints[0] < 1) { - printk(KERN_ERR "atari_mouse_setup: no arguments!\n" ); - return 0; - } - else if (ints[0] > 2) { - printk(KERN_WARNING "atari_mouse_setup: too many arguments\n" ); - } - - if (ints[1] < MIN_THRESHOLD || ints[1] > MAX_THRESHOLD) - printk(KERN_WARNING "atari_mouse_setup: bad threshold value (ignored)\n" ); - else { - mouse_threshold[0] = ints[1]; - mouse_threshold[1] = ints[1]; - if (ints[0] > 1) { - if (ints[2] < MIN_THRESHOLD || ints[2] > MAX_THRESHOLD) - printk(KERN_WARNING "atari_mouse_setup: bad threshold value (ignored)\n" ); - else - mouse_threshold[1] = ints[2]; - } - } - - return 1; -} - -__setup("atarimouse=",atari_mouse_setup); - -#endif /* !MODULE */ - static void __exit atari_mouse_cleanup (void) { unregister_busmouse(msedev); @@ -133,4 +93,4 @@ module_init(atari_mouse_init); module_exit(atari_mouse_cleanup); -MODULE_LICENSE("GPL"); \ No newline at end of file +MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/cyclades.c tmp2/drivers/char/cyclades.c --- tmp/drivers/char/cyclades.c Sat Sep 15 07:04:07 2001 +++ tmp2/drivers/char/cyclades.c Thu Nov 22 18:55:24 2001 @@ -744,8 +744,8 @@ static long maddr[NR_CARDS] = { 0, }; static int irq[NR_CARDS] = { 0, }; -MODULE_PARM(maddr, "1-" __MODULE_STRING(NR_CARDS) "l"); -MODULE_PARM(irq, "1-" __MODULE_STRING(NR_CARDS) "i"); +PARAM_ARRAY(maddr, maddr, long, 1, NR_CARDS, 000); +PARAM_ARRAY(irq, irq, int, 1, NR_CARDS, 000); #endif #endif /* CONFIG_ISA */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/drm/drm_drv.h tmp2/drivers/char/drm/drm_drv.h --- tmp/drivers/char/drm/drm_drv.h Mon Oct 22 03:40:36 2001 +++ tmp2/drivers/char/drm/drm_drv.h Thu Nov 22 18:55:24 2001 @@ -233,7 +233,7 @@ MODULE_AUTHOR( DRIVER_AUTHOR ); MODULE_DESCRIPTION( DRIVER_DESC ); -MODULE_PARM( drm_opts, "s" ); +PARAM(drm_opts, charp, S_IRUGO); MODULE_LICENSE("GPL and additional rights"); static int DRM(setup)( drm_device_t *dev ) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/drm/ffb_drv.c tmp2/drivers/char/drm/ffb_drv.c --- tmp/drivers/char/drm/ffb_drv.c Mon Oct 22 03:40:36 2001 +++ tmp2/drivers/char/drm/ffb_drv.c Thu Nov 22 18:55:24 2001 @@ -372,25 +372,6 @@ return ret; } -#ifndef MODULE -/* DRM(options) is called by the kernel to parse command-line options - * passed via the boot-loader (e.g., LILO). It calls the insmod option - * routine, drm_parse_drm. - */ - -/* JH- We have to hand expand the string ourselves because of the cpp. If - * anyone can think of a way that we can fit into the __setup macro without - * changing it, then please send the solution my way. - */ -static int __init ffb_options(char *str) -{ - DRM(parse_options)(str); - return 1; -} - -__setup(DRIVER_NAME "=", ffb_options); -#endif - #include "drm_fops.h" #include "drm_init.h" #include "drm_ioctl.h" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/drm/gamma_drv.c tmp2/drivers/char/drm/gamma_drv.c --- tmp/drivers/char/drm/gamma_drv.c Thu Aug 9 02:42:14 2001 +++ tmp2/drivers/char/drm/gamma_drv.c Thu Nov 22 18:55:24 2001 @@ -63,26 +63,6 @@ #include "drm_drawable.h" #include "drm_drv.h" -#ifndef MODULE -/* DRM(options) is called by the kernel to parse command-line options - * passed via the boot-loader (e.g., LILO). It calls the insmod option - * routine, drm_parse_drm. - */ - -/* JH- We have to hand expand the string ourselves because of the cpp. If - * anyone can think of a way that we can fit into the __setup macro without - * changing it, then please send the solution my way. - */ -static int __init gamma_options( char *str ) -{ - DRM(parse_options)( str ); - return 1; -} - -__setup( DRIVER_NAME "=", gamma_options ); -#endif - - #include "drm_fops.h" #include "drm_init.h" #include "drm_ioctl.h" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/drm/i810_drv.c tmp2/drivers/char/drm/i810_drv.c --- tmp/drivers/char/drm/i810_drv.c Thu Aug 9 02:42:15 2001 +++ tmp2/drivers/char/drm/i810_drv.c Thu Nov 22 18:55:24 2001 @@ -72,25 +72,6 @@ #include "drm_drawable.h" #include "drm_drv.h" -#ifndef MODULE -/* DRM(options) is called by the kernel to parse command-line options - * passed via the boot-loader (e.g., LILO). It calls the insmod option - * routine, drm_parse_drm. - */ - -/* JH- We have to hand expand the string ourselves because of the cpp. If - * anyone can think of a way that we can fit into the __setup macro without - * changing it, then please send the solution my way. - */ -static int __init i810_options( char *str ) -{ - DRM(parse_options)( str ); - return 1; -} - -__setup( DRIVER_NAME "=", i810_options ); -#endif - #include "drm_fops.h" #include "drm_init.h" #include "drm_ioctl.h" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/drm/mga_drv.c tmp2/drivers/char/drm/mga_drv.c --- tmp/drivers/char/drm/mga_drv.c Thu Aug 9 02:42:15 2001 +++ tmp2/drivers/char/drm/mga_drv.c Thu Nov 22 18:55:24 2001 @@ -71,26 +71,6 @@ #include "drm_drawable.h" #include "drm_drv.h" -#ifndef MODULE -/* DRM(options) is called by the kernel to parse command-line options - * passed via the boot-loader (e.g., LILO). It calls the insmod option - * routine, drm_parse_drm. - */ - -/* JH- We have to hand expand the string ourselves because of the cpp. If - * anyone can think of a way that we can fit into the __setup macro without - * changing it, then please send the solution my way. - */ -static int __init mga_options( char *str ) -{ - DRM(parse_options)( str ); - return 1; -} - -__setup( DRIVER_NAME "=", mga_options ); -#endif - - #include "drm_fops.h" #include "drm_init.h" #include "drm_ioctl.h" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/drm/r128_drv.c tmp2/drivers/char/drm/r128_drv.c --- tmp/drivers/char/drm/r128_drv.c Thu Aug 9 02:42:15 2001 +++ tmp2/drivers/char/drm/r128_drv.c Thu Nov 22 18:55:24 2001 @@ -82,25 +82,6 @@ #include "drm_drawable.h" #include "drm_drv.h" -#ifndef MODULE -/* DRM(options) is called by the kernel to parse command-line options - * passed via the boot-loader (e.g., LILO). It calls the insmod option - * routine, drm_parse_drm. - */ - -/* JH- We have to hand expand the string ourselves because of the cpp. If - * anyone can think of a way that we can fit into the __setup macro without - * changing it, then please send the solution my way. - */ -static int __init r128_options( char *str ) -{ - DRM(parse_options)( str ); - return 1; -} - -__setup( DRIVER_NAME "=", r128_options ); -#endif - #include "drm_fops.h" #include "drm_init.h" #include "drm_ioctl.h" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/drm/radeon_drv.c tmp2/drivers/char/drm/radeon_drv.c --- tmp/drivers/char/drm/radeon_drv.c Thu Aug 9 02:42:15 2001 +++ tmp2/drivers/char/drm/radeon_drv.c Thu Nov 22 18:55:24 2001 @@ -79,25 +79,6 @@ #include "drm_drawable.h" #include "drm_drv.h" -#ifndef MODULE -/* DRM(options) is called by the kernel to parse command-line options - * passed via the boot-loader (e.g., LILO). It calls the insmod option - * routine, drm_parse_drm. - */ - -/* JH- We have to hand expand the string ourselves because of the cpp. If - * anyone can think of a way that we can fit into the __setup macro without - * changing it, then please send the solution my way. - */ -static int __init radeon_options( char *str ) -{ - DRM(parse_options)( str ); - return 1; -} - -__setup( DRIVER_NAME "=", radeon_options ); -#endif - #include "drm_fops.h" #include "drm_init.h" #include "drm_ioctl.h" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/drm/tdfx_drv.c tmp2/drivers/char/drm/tdfx_drv.c --- tmp/drivers/char/drm/tdfx_drv.c Tue Aug 28 00:40:33 2001 +++ tmp2/drivers/char/drm/tdfx_drv.c Thu Nov 22 18:55:24 2001 @@ -82,25 +82,6 @@ #include "drm_drawable.h" #include "drm_drv.h" -#ifndef MODULE -/* DRM(options) is called by the kernel to parse command-line options - * passed via the boot-loader (e.g., LILO). It calls the insmod option - * routine, drm_parse_drm. - */ - -/* JH- We have to hand expand the string ourselves because of the cpp. If - * anyone can think of a way that we can fit into the __setup macro without - * changing it, then please send the solution my way. - */ -static int __init tdfx_options( char *str ) -{ - DRM(parse_options)( str ); - return 1; -} - -__setup( DRIVER_NAME "=", tdfx_options ); -#endif - #include "drm_fops.h" #include "drm_init.h" #include "drm_ioctl.h" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/esp.c tmp2/drivers/char/esp.c --- tmp/drivers/char/esp.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/char/esp.c Thu Nov 22 18:55:24 2001 @@ -85,15 +85,15 @@ MODULE_LICENSE("GPL"); -MODULE_PARM(irq, "1-8i"); -MODULE_PARM(divisor, "1-8i"); -MODULE_PARM(dma, "i"); -MODULE_PARM(rx_trigger, "i"); -MODULE_PARM(tx_trigger, "i"); -MODULE_PARM(flow_off, "i"); -MODULE_PARM(flow_on, "i"); -MODULE_PARM(rx_timeout, "i"); -MODULE_PARM(pio_threshold, "i"); +PARAM_ARRAY(irq, irq, int, 1, 8, 000); +PARAM_ARRAY(divisor, divisor, int, 1, 8, 000); +PARAM(dma, int, 000); +PARAM(rx_trigger, int, 000); +PARAM(tx_trigger, int, 000); +PARAM(flow_off, int, 000); +PARAM(flow_on, int, 000); +PARAM(rx_timeout, int, 000); +PARAM(pio_threshold, int, 000); /* END */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/eurotechwdt.c tmp2/drivers/char/eurotechwdt.c --- tmp/drivers/char/eurotechwdt.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/char/eurotechwdt.c Thu Nov 22 18:55:24 2001 @@ -73,42 +73,11 @@ #define WDT_TIMEOUT_VAL 0xf2 #define WDT_TIMER_CFG 0xf3 - -#ifndef MODULE - -/** - * eurwdt_setup: - * @str: command line string - * - * Setup options. The board isn't really probe-able so we have to - * get the user to tell us the configuration. Sane people build it - * modular but the others come here. - */ - -static int __init eurwdt_setup(char *str) -{ - int ints[4]; - - str = get_options (str, ARRAY_SIZE(ints), ints); - - if (ints[0] > 0) { - io = ints[1]; - if (ints[0] > 1) - irq = ints[2]; - } - - return 1; -} - -__setup("wdt=", eurwdt_setup); - -#endif /* !MODULE */ - -MODULE_PARM(io, "i"); +PARAM(io, int, 000); MODULE_PARM_DESC(io, "Eurotech WDT io port (default=0x3f0)"); -MODULE_PARM(irq, "i"); +PARAM(irq, int, 000); MODULE_PARM_DESC(irq, "Eurotech WDT irq (default=10)"); -MODULE_PARM(ev, "s"); +PARAM(ev, charp, 000); MODULE_PARM_DESC(ev, "Eurotech WDT event type (default is `reboot')"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/ftape/lowlevel/ftape-init.c tmp2/drivers/char/ftape/lowlevel/ftape-init.c --- tmp/drivers/char/ftape/lowlevel/ftape-init.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/char/ftape/lowlevel/ftape-init.c Thu Nov 22 18:55:24 2001 @@ -134,18 +134,17 @@ #if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18) #define FT_MOD_PARM(var,type,desc) \ - MODULE_PARM(var,type); MODULE_PARM_DESC(var,desc) - -FT_MOD_PARM(ft_fdc_base, "i", "Base address of FDC controller."); -FT_MOD_PARM(ft_fdc_irq, "i", "IRQ (interrupt channel) to use."); -FT_MOD_PARM(ft_fdc_dma, "i", "DMA channel to use."); -FT_MOD_PARM(ft_fdc_threshold, "i", "Threshold of the FDC Fifo."); -FT_MOD_PARM(ft_fdc_rate_limit, "i", "Maximal data rate for FDC."); -FT_MOD_PARM(ft_probe_fc10, "i", + PARAM(var,type,000); MODULE_PARM_DESC(var,desc) +FT_MOD_PARM(ft_fdc_base, int, "Base address of FDC controller."); +FT_MOD_PARM(ft_fdc_irq, int, "IRQ (interrupt channel) to use."); +FT_MOD_PARM(ft_fdc_dma, int, "DMA channel to use."); +FT_MOD_PARM(ft_fdc_threshold, int, "Threshold of the FDC Fifo."); +FT_MOD_PARM(ft_fdc_rate_limit, int, "Maximal data rate for FDC."); +FT_MOD_PARM(ft_probe_fc10, int, "If non-zero, probe for a Colorado FC-10/FC-20 controller."); -FT_MOD_PARM(ft_mach2, "i", +FT_MOD_PARM(ft_mach2, int, "If non-zero, probe for a Mountain MACH-2 controller."); -FT_MOD_PARM(ft_tracing, "i", +FT_MOD_PARM(ft_tracing, int, "Amount of debugging output, 0 <= tracing <= 8, default 3."); MODULE_AUTHOR( "(c) 1993-1996 Bas Laarhoven (bas@vimec.nl), " diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/ftape/lowlevel/ftape-setup.c tmp2/drivers/char/ftape/lowlevel/ftape-setup.c --- tmp/drivers/char/ftape/lowlevel/ftape-setup.c Fri Aug 13 04:53:22 1999 +++ tmp2/drivers/char/ftape/lowlevel/ftape-setup.c Thu Nov 22 18:55:24 2001 @@ -60,7 +60,7 @@ { "mach2", &ft_mach2, CONFIG_FT_MACH2, 0, 1} }; -static int __init ftape_setup(char *str) +static int __init ftape_setup(char *str, struct kernel_param *kp) { int i; int param; @@ -105,7 +105,7 @@ TRACE(ft_t_err, "botched ftape option"); } out: - TRACE_EXIT 1; + TRACE_EXIT 0; } -__setup("ftape=", ftape_setup); +PARAM_CALL(ftape, ftape_setup, NULL); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/generic_serial.c tmp2/drivers/char/generic_serial.c --- tmp/drivers/char/generic_serial.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/char/generic_serial.c Thu Nov 22 18:55:24 2001 @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -56,7 +57,7 @@ #define RS_EVENT_WRITE_WAKEUP 1 -MODULE_PARM(gs_debug, "i"); +PARAM(gs_debug, int, 000); void gs_put_char(struct tty_struct * tty, unsigned char ch) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/i810-tco.c tmp2/drivers/char/i810-tco.c --- tmp/drivers/char/i810-tco.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/char/i810-tco.c Thu Nov 22 18:55:24 2001 @@ -59,7 +59,7 @@ static int i810_margin = TIMER_MARGIN; /* steps of 0.6sec */ -MODULE_PARM (i810_margin, "i"); +PARAM(i810_margin, int, 000); /* * Timer active flag diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/i8k.c tmp2/drivers/char/i8k.c --- tmp/drivers/char/i8k.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/char/i8k.c Thu Nov 22 18:55:24 2001 @@ -58,7 +58,7 @@ MODULE_AUTHOR("Massimo Dal Zotto (dz@debian.org)"); MODULE_DESCRIPTION("Driver for accessing the SMM BIOS on Dell I8000 laptops"); MODULE_LICENSE("GPL"); -MODULE_PARM(force, "i"); +PARAM(force, bool, 000); MODULE_PARM_DESC(force, "Force loading without checking for an Inspiron 8000"); static ssize_t i8k_read(struct file *, char *, size_t, loff_t *); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/ip2.c tmp2/drivers/char/ip2.c --- tmp/drivers/char/ip2.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/char/ip2.c Thu Nov 22 18:55:24 2001 @@ -35,23 +35,21 @@ static int irq[IP2_MAX_BOARDS] = { -1, -1, -1, -1 }; static int poll_only = 0; -#ifdef MODULE - # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0) MODULE_AUTHOR("Doug McNash"); MODULE_DESCRIPTION("Computone IntelliPort Plus Driver"); - MODULE_PARM(irq,"1-"__MODULE_STRING(IP2_MAX_BOARDS) "i"); + PARAM_ARRAY(irq, irq, int, 1, IP2_MAX_BOARDS, 000); MODULE_PARM_DESC(irq,"Interrupts for IntelliPort Cards"); - MODULE_PARM(io,"1-"__MODULE_STRING(IP2_MAX_BOARDS) "i"); + PARAM_ARRAY(io, io, int, 1, IP2_MAX_BOARDS, 000); MODULE_PARM_DESC(io,"I/O ports for IntelliPort Cards"); - MODULE_PARM(poll_only,"1i"); + PARAM(poll_only, bool, 000); MODULE_PARM_DESC(poll_only,"Do not use card interrupts"); # endif /* LINUX_VERSION */ //====================================================================== -int -init_module(void) +static int +init(void) { int rc; @@ -78,74 +76,12 @@ } //====================================================================== -void -cleanup_module(void) +static void +cleanup(void) { } MODULE_LICENSE("GPL"); -#else // !MODULE - -#ifndef NULL -# define NULL ((void *) 0) -#endif - -/****************************************************************************** - * ip2_setup: - * str: kernel command line string - * - * Can't autoprobe the boards so user must specify configuration on - * kernel command line. Sane people build it modular but the others - * come here. - * - * Alternating pairs of io,irq for up to 4 boards. - * ip2=io0,irq0,io1,irq1,io2,irq2,io3,irq3 - * - * io=0 => No board - * io=1 => PCI - * io=2 => EISA - * else => ISA I/O address - * - * irq=0 or invalid for ISA will revert to polling mode - * - * Any value = -1, do not overwrite compiled in value. - * - ******************************************************************************/ -static int __init ip2_setup(char *str) -{ - int ints[10]; /* 4 boards, 2 parameters + 2 */ - int i, j; - - str = get_options (str, ARRAY_SIZE(ints), ints); - - for( i = 0, j = 1; i < 4; i++ ) { - if( j > ints[0] ) { - break; - } - if( ints[j] >= 0 ) { - io[i] = ints[j]; - } - j++; - if( j > ints[0] ) { - break; - } - if( ints[j] >= 0 ) { - irq[i] = ints[j]; - } - j++; - } - return 1; -} - -int -ip2_init(void) { - return ip2_loadmain(io,irq,(unsigned char *)fip_firm,sizeof(fip_firm)); -} - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13)) -__setup("ip2=", ip2_setup); -__initcall(ip2_init); -#endif - -#endif /* !MODULE */ +module_init(init); +module_exit(cleanup); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/isicom.c tmp2/drivers/char/isicom.c --- tmp/drivers/char/isicom.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/char/isicom.c Thu Nov 22 18:55:24 2001 @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include @@ -1931,9 +1931,9 @@ MODULE_AUTHOR("MultiTech"); MODULE_DESCRIPTION("Driver for the ISI series of cards by MultiTech"); MODULE_LICENSE("GPL"); -MODULE_PARM(io, "1-4i"); +PARAM_ARRAY(io, io, int, 1, 4, 000); MODULE_PARM_DESC(io, "I/O ports for the cards"); -MODULE_PARM(irq, "1-4i"); +PARAM_ARRAY(irq, irq, int, 1, 4, 000); MODULE_PARM_DESC(irq, "Interrupts for the cards"); int init_module(void) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/istallion.c tmp2/drivers/char/istallion.c --- tmp/drivers/char/istallion.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/char/istallion.c Thu Nov 22 18:55:24 2001 @@ -389,13 +389,13 @@ MODULE_LICENSE("GPL"); -MODULE_PARM(board0, "1-3s"); +PARAM_ARRAY(board0, board0, charp, 1, 3, S_IRUGO); MODULE_PARM_DESC(board0, "Board 0 config -> name[,ioaddr[,memaddr]"); -MODULE_PARM(board1, "1-3s"); +PARAM_ARRAY(board1, board1, charp, 1, 3, S_IRUGO); MODULE_PARM_DESC(board1, "Board 1 config -> name[,ioaddr[,memaddr]"); -MODULE_PARM(board2, "1-3s"); +PARAM_ARRAY(board2, board2, charp, 1, 3, S_IRUGO); MODULE_PARM_DESC(board2, "Board 2 config -> name[,ioaddr[,memaddr]"); -MODULE_PARM(board3, "1-3s"); +PARAM_ARRAY(board3, board3, charp, 1, 3, S_IRUGO); MODULE_PARM_DESC(board3, "Board 3 config -> name[,ioaddr[,memaddr]"); #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/joystick/amijoy.c tmp2/drivers/char/joystick/amijoy.c --- tmp/drivers/char/joystick/amijoy.c Thu Sep 13 08:34:06 2001 +++ tmp2/drivers/char/joystick/amijoy.c Thu Nov 22 18:55:24 2001 @@ -41,7 +41,7 @@ #include MODULE_AUTHOR("Vojtech Pavlik "); -MODULE_PARM(amijoy, "1-2i"); +PARAM_ARRAY(amijoy, amijoy, int, 1, 2, 000); MODULE_LICENSE("GPL"); static int amijoy[2] = { 0, 1 }; @@ -93,16 +93,6 @@ if (!--(*used)) free_irq(IRQ_AMIGA_VERTB, amijoy_interrupt); } - -static int __init amijoy_setup(char *str) -{ - int i; - int ints[4] - str = get_options(str, ARRAY_SIZE(ints), ints); - for (i = 0; i <= ints[0] && i < 2; i++) amijoy[i] = ints[i+1]; - return 1; -} -__setup("amijoy=", amijoy_setup); static int __init amijoy_init(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/joystick/analog.c tmp2/drivers/char/joystick/analog.c --- tmp/drivers/char/joystick/analog.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/char/joystick/analog.c Thu Nov 22 18:55:24 2001 @@ -53,7 +53,7 @@ static char *js[ANALOG_PORTS]; static int analog_options[ANALOG_PORTS]; -MODULE_PARM(js, "1-" __MODULE_STRING(ANALOG_PORTS) "s"); +PARAM_ARRAY(js, js, charp, 1, ANALOG_PORTS, S_IRUGO); MODULE_PARM_DESC(js, "Analog joystick options"); /* @@ -726,24 +726,6 @@ connect: analog_connect, disconnect: analog_disconnect, }; - -#ifndef MODULE -static int __init analog_setup(char *str) -{ - char *s = str; - int i = 0; - - if (!str || !*str) return 0; - - while ((str = s) && (i < ANALOG_PORTS)) { - if ((s = strchr(str,','))) *s++ = 0; - js[i++] = str; - } - - return 1; -} -__setup("js=", analog_setup); -#endif int __init analog_init(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/joystick/db9.c tmp2/drivers/char/joystick/db9.c --- tmp/drivers/char/joystick/db9.c Thu Sep 13 08:34:06 2001 +++ tmp2/drivers/char/joystick/db9.c Thu Nov 22 18:55:24 2001 @@ -42,9 +42,6 @@ MODULE_AUTHOR("Vojtech Pavlik "); MODULE_LICENSE("GPL"); -MODULE_PARM(db9, "2i"); -MODULE_PARM(db9_2, "2i"); -MODULE_PARM(db9_3, "2i"); #define DB9_MULTI_STICK 0x01 #define DB9_MULTI2_STICK 0x02 @@ -81,6 +78,10 @@ static int db9_2[] __initdata = { -1, 0 }; static int db9_3[] __initdata = { -1, 0 }; +PARAM_ARRAY(db9, db9, int, 1, 2, 000); +PARAM_ARRAY(db9_2, db9_2, int, 1, 2, 000); +PARAM_ARRAY(db9_3, db9_3, int, 1, 2, 000); + struct db9 { struct input_dev dev[2]; struct timer_list timer; @@ -368,33 +369,6 @@ return db9; } - -#ifndef MODULE -int __init db9_setup(char *str) -{ - int i, ints[3]; - get_options(str, ARRAY_SIZE(ints), ints); - for (i = 0; i <= ints[0] && i < 2; i++) db9[i] = ints[i + 1]; - return 1; -} -int __init db9_setup_2(char *str) -{ - int i, ints[3]; - get_options(str, ARRAY_SIZE(ints), ints); - for (i = 0; i <= ints[0] && i < 2; i++) db9_2[i] = ints[i + 1]; - return 1; -} -int __init db9_setup_3(char *str) -{ - int i, ints[3]; - get_options(str, ARRAY_SIZE(ints), ints); - for (i = 0; i <= ints[0] && i < 2; i++) db9_3[i] = ints[i + 1]; - return 1; -} -__setup("db9=", db9_setup); -__setup("db9_2=", db9_setup_2); -__setup("db9_3=", db9_setup_3); -#endif int __init db9_init(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/joystick/gamecon.c tmp2/drivers/char/joystick/gamecon.c --- tmp/drivers/char/joystick/gamecon.c Thu Sep 13 08:34:06 2001 +++ tmp2/drivers/char/joystick/gamecon.c Thu Nov 22 18:55:24 2001 @@ -43,10 +43,6 @@ MODULE_AUTHOR("Vojtech Pavlik "); MODULE_LICENSE("GPL"); -MODULE_PARM(gc, "2-6i"); -MODULE_PARM(gc_2,"2-6i"); -MODULE_PARM(gc_3,"2-6i"); - #define GC_SNES 1 #define GC_NES 2 #define GC_NES4 3 @@ -73,6 +69,10 @@ static int gc_2[] __initdata = { -1, 0, 0, 0, 0, 0 }; static int gc_3[] __initdata = { -1, 0, 0, 0, 0, 0 }; +PARAM_ARRAY(gc, gc, int, 2, 6, 000); +PARAM_ARRAY(gc_2, gc_2, int, 2, 6, 000); +PARAM_ARRAY(gc_3, gc_3, int, 2, 6, 000); + static int gc_status_bit[] = { 0x40, 0x80, 0x20, 0x10, 0x08 }; static char *gc_names[] = { NULL, "SNES pad", "NES pad", "NES FourPort", "Multisystem joystick", @@ -613,33 +613,6 @@ return gc; } - -#ifndef MODULE -int __init gc_setup(char *str) -{ - int i, ints[7]; - get_options(str, ARRAY_SIZE(ints), ints); - for (i = 0; i <= ints[0] && i < 6; i++) gc[i] = ints[i + 1]; - return 1; -} -int __init gc_setup_2(char *str) -{ - int i, ints[7]; - get_options(str, ARRAY_SIZE(ints), ints); - for (i = 0; i <= ints[0] && i < 6; i++) gc_2[i] = ints[i + 1]; - return 1; -} -int __init gc_setup_3(char *str) -{ - int i, ints[7]; - get_options(str, ARRAY_SIZE(ints), ints); - for (i = 0; i <= ints[0] && i < 6; i++) gc_3[i] = ints[i + 1]; - return 1; -} -__setup("gc=", gc_setup); -__setup("gc_2=", gc_setup_2); -__setup("gc_3=", gc_setup_3); -#endif int __init gc_init(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/joystick/turbografx.c tmp2/drivers/char/joystick/turbografx.c --- tmp/drivers/char/joystick/turbografx.c Thu Sep 13 08:34:06 2001 +++ tmp2/drivers/char/joystick/turbografx.c Thu Nov 22 18:55:24 2001 @@ -41,9 +41,6 @@ MODULE_AUTHOR("Vojtech Pavlik "); MODULE_LICENSE("GPL"); -MODULE_PARM(tgfx, "2-8i"); -MODULE_PARM(tgfx_2, "2-8i"); -MODULE_PARM(tgfx_3, "2-8i"); #define TGFX_REFRESH_TIME HZ/100 /* 10 ms */ @@ -62,6 +59,10 @@ static int tgfx_2[] __initdata = { -1, 0, 0, 0, 0, 0, 0, 0 }; static int tgfx_3[] __initdata = { -1, 0, 0, 0, 0, 0, 0, 0 }; +PARAM_ARRAY(tgfx, tgfx, int, 2, 8, 000); +PARAM_ARRAY(tgfx_2, tgfx_2, int, 2, 8, 000); +PARAM_ARRAY(tgfx_3, tgfx_3, int, 2, 8, 000); + static int tgfx_buttons[] = { BTN_TRIGGER, BTN_THUMB, BTN_THUMB2, BTN_TOP, BTN_TOP2 }; static char *tgfx_name = "TurboGraFX Multisystem joystick"; @@ -202,33 +203,6 @@ return tgfx; } - -#ifndef MODULE -int __init tgfx_setup(char *str) -{ - int i, ints[9]; - get_options(str, ARRAY_SIZE(ints), ints); - for (i = 0; i <= ints[0] && i < 8; i++) tgfx[i] = ints[i + 1]; - return 1; -} -int __init tgfx_setup_2(char *str) -{ - int i, ints[9]; - get_options(str, ARRAY_SIZE(ints), ints); - for (i = 0; i <= ints[0] && i < 8; i++) tgfx_2[i] = ints[i + 1]; - return 1; -} -int __init tgfx_setup_3(char *str) -{ - int i, ints[9]; - get_options(str, ARRAY_SIZE(ints), ints); - for (i = 0; i <= ints[0] && i < 8; i++) tgfx_3[i] = ints[i + 1]; - return 1; -} -__setup("tgfx=", tgfx_setup); -__setup("tgfx_2=", tgfx_setup_2); -__setup("tgfx_3=", tgfx_setup_3); -#endif int __init tgfx_init(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/logibusmouse.c tmp2/drivers/char/logibusmouse.c --- tmp/drivers/char/logibusmouse.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/char/logibusmouse.c Thu Nov 22 18:55:24 2001 @@ -61,25 +61,7 @@ static int msedev; static int mouse_irq = MOUSE_IRQ; -MODULE_PARM(mouse_irq, "i"); - -#ifndef MODULE - -static int __init bmouse_setup(char *str) -{ - int ints[4]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - if (ints[0] > 0) - mouse_irq=ints[1]; - - return 1; -} - -__setup("logi_busmouse=", bmouse_setup); - -#endif /* !MODULE */ +PARAM(mouse_irq, int, 000); static void mouse_interrupt(int irq, void *dev_id, struct pt_regs *regs) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/lp.c tmp2/drivers/char/lp.c --- tmp/drivers/char/lp.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/char/lp.c Thu Nov 22 18:55:24 2001 @@ -703,40 +703,8 @@ static char *parport[LP_NO] = { NULL, }; static int reset = 0; -MODULE_PARM(parport, "1-" __MODULE_STRING(LP_NO) "s"); -MODULE_PARM(reset, "i"); - -#ifndef MODULE -static int __init lp_setup (char *str) -{ - static int parport_ptr; // initially zero - int x; - - if (get_option (&str, &x)) { - if (x == 0) { - /* disable driver on "lp=" or "lp=0" */ - parport_nr[0] = LP_PARPORT_OFF; - } else { - printk(KERN_WARNING "warning: 'lp=0x%x' is deprecated, ignored\n", x); - return 0; - } - } else if (!strncmp(str, "parport", 7)) { - int n = simple_strtoul(str+7, NULL, 10); - if (parport_ptr < LP_NO) - parport_nr[parport_ptr++] = n; - else - printk(KERN_INFO "lp: too many ports, %s ignored.\n", - str); - } else if (!strcmp(str, "auto")) { - parport_nr[0] = LP_PARPORT_AUTO; - } else if (!strcmp(str, "none")) { - parport_nr[parport_ptr++] = LP_PARPORT_NONE; - } else if (!strcmp(str, "reset")) { - reset = 1; - } - return 1; -} -#endif +PARAM_ARRAY(parport, parport, charp, 1, LP_NO, S_IRUGO); +PARAM(reset, int, 000); static int lp_register(int nr, struct parport *port) { @@ -921,7 +889,6 @@ } } -__setup("lp=", lp_setup); module_init(lp_init_module); module_exit(lp_cleanup_module); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/machzwd.c tmp2/drivers/char/machzwd.c --- tmp/drivers/char/machzwd.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/char/machzwd.c Thu Nov 22 18:55:24 2001 @@ -100,7 +100,7 @@ MODULE_AUTHOR("Fernando Fuganti "); MODULE_DESCRIPTION("MachZ ZF-Logic Watchdog driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(action, "i"); +PARAM(action, int, 000); MODULE_PARM_DESC(action, "after watchdog resets, generate: 0 = RESET(*) 1 = SMI 2 = NMI 3 = SCI"); #define PFX "machzwd" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/moxa.c tmp2/drivers/char/moxa.c --- tmp/drivers/char/moxa.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/char/moxa.c Thu Nov 22 18:55:24 2001 @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -204,12 +205,12 @@ MODULE_AUTHOR("William Chen"); MODULE_DESCRIPTION("MOXA Intellio Family Multiport Board Device Driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(type, "1-4i"); -MODULE_PARM(baseaddr, "1-4i"); -MODULE_PARM(numports, "1-4i"); -MODULE_PARM(ttymajor, "i"); -MODULE_PARM(calloutmajor, "i"); -MODULE_PARM(verbose, "i"); +PARAM_ARRAY(type, type, int, 1, 4, 000); +PARAM_ARRAY(baseaddr, baseaddr, int, 1, 4, 000); +PARAM_ARRAY(numports, numports, int, 1, 4, 000); +PARAM(ttymajor, int, 000); +PARAM(calloutmajor, int, 000); +PARAM(verbose, int, 000); EXPORT_NO_SYMBOLS; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/msbusmouse.c tmp2/drivers/char/msbusmouse.c --- tmp/drivers/char/msbusmouse.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/char/msbusmouse.c Thu Nov 22 18:55:24 2001 @@ -56,25 +56,7 @@ static int msedev; static int mouse_irq = MOUSE_IRQ; -MODULE_PARM(mouse_irq, "i"); - -#ifndef MODULE - -static int __init msmouse_setup(char *str) -{ - int ints[4]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - if (ints[0] > 0) - mouse_irq=ints[1]; - - return 1; -} - -__setup("msmouse=",msmouse_setup); - -#endif /* !MODULE */ +PARAM(mouse_irq, int, 000); static void ms_mouse_interrupt(int irq, void *dev_id, struct pt_regs * regs) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/mwave/mwavedd.c tmp2/drivers/char/mwave/mwavedd.c --- tmp/drivers/char/mwave/mwavedd.c Fri Oct 12 02:14:32 2001 +++ tmp2/drivers/char/mwave/mwavedd.c Thu Nov 22 18:55:24 2001 @@ -103,11 +103,11 @@ int mwave_3780i_io = 0; int mwave_uart_irq = 0; int mwave_uart_io = 0; -MODULE_PARM(mwave_debug, "i"); -MODULE_PARM(mwave_3780i_irq, "i"); -MODULE_PARM(mwave_3780i_io, "i"); -MODULE_PARM(mwave_uart_irq, "i"); -MODULE_PARM(mwave_uart_io, "i"); +PARAM(mwave_debug, int, 000); +PARAM(mwave_3780i_irq, int, 000); +PARAM(mwave_3780i_io, int, 000); +PARAM(mwave_uart_irq, int, 000); +PARAM(mwave_uart_io, int, 000); static int mwave_open(struct inode *inode, struct file *file); static int mwave_close(struct inode *inode, struct file *file); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/mxser.c tmp2/drivers/char/mxser.c --- tmp/drivers/char/mxser.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/char/mxser.c Thu Nov 22 18:55:24 2001 @@ -54,6 +54,7 @@ #include #include #include +#include #include #include @@ -178,10 +179,10 @@ MODULE_AUTHOR("William Chen"); MODULE_DESCRIPTION("MOXA Smartio Family Multiport Board Device Driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(ioaddr, "1-4i"); -MODULE_PARM(ttymajor, "i"); -MODULE_PARM(calloutmajor, "i"); -MODULE_PARM(verbose, "i"); +PARAM_ARRAY(ioaddr, ioaddr, int, 1, 4, 000); +PARAM(ttymajor, int, 000); +PARAM(calloutmajor, int, 000); +PARAM(verbose, int, 000); EXPORT_NO_SYMBOLS; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/n_hdlc.c tmp2/drivers/char/n_hdlc.c --- tmp/drivers/char/n_hdlc.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/char/n_hdlc.c Thu Nov 22 18:55:24 2001 @@ -185,16 +185,15 @@ static struct n_hdlc *n_hdlc_alloc (void); -MODULE_PARM(debuglevel, "i"); -MODULE_PARM(maxframe, "i"); - - /* debug level can be set by insmod for debugging purposes */ #define DEBUG_LEVEL_INFO 1 int debuglevel=0; /* max frame size for memory allocations */ ssize_t maxframe=4096; + +PARAM(debuglevel, int, 000); +PARAM(maxframe, int, 000); /* TTY callbacks */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/nwflash.c tmp2/drivers/char/nwflash.c --- tmp/drivers/char/nwflash.c Sat Oct 13 06:48:42 2001 +++ tmp2/drivers/char/nwflash.c Thu Nov 22 18:55:24 2001 @@ -689,7 +689,7 @@ MODULE_LICENSE("GPL"); -MODULE_PARM(flashdebug, "i"); +PARAM(flashdebug, int, 000); module_init(nwflash_init); module_exit(nwflash_exit); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/pc_keyb.c tmp2/drivers/char/pc_keyb.c --- tmp/drivers/char/pc_keyb.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/char/pc_keyb.c Thu Nov 22 18:55:24 2001 @@ -666,14 +666,7 @@ int kbd_startup_reset __initdata = 1; #endif -/* for "kbd-reset" cmdline param */ -static int __init kbd_reset_setup(char *str) -{ - kbd_startup_reset = 1; - return 1; -} - -__setup("kbd-reset", kbd_reset_setup); +PARAM_NAMED(kbd_reset, kbd_startup_reset, int, 000); #define KBD_NO_DATA (-1) /* No data */ #define KBD_BAD_DATA (-2) /* Parity or other error */ @@ -918,13 +911,7 @@ #if defined CONFIG_PSMOUSE -static int __init aux_reconnect_setup (char *str) -{ - aux_reconnect = 1; - return 1; -} - -__setup("psaux-reconnect", aux_reconnect_setup); +PARAM_NAMED(psaux_reconnect, aux_reconnect, int, 000); /* * Check if this is a dual port controller. diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/pcmcia/serial_cs.c tmp2/drivers/char/pcmcia/serial_cs.c --- tmp/drivers/char/pcmcia/serial_cs.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/char/pcmcia/serial_cs.c Thu Nov 22 18:55:24 2001 @@ -55,7 +55,7 @@ #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); +PARAM(pc_debug, int, 000); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) static char *version = "serial_cs.c 1.123 2000/08/24 18:46:38 (David Hinds)"; @@ -65,7 +65,7 @@ /*====================================================================*/ -/* Parameters that can be set with 'insmod' */ +/* Parameters */ /* Bit map of interrupts to choose from */ static u_int irq_mask = 0xdeb8; @@ -74,9 +74,9 @@ /* Enable the speaker? */ static int do_sound = 1; -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); -MODULE_PARM(do_sound, "i"); +PARAM(irq_mask, int, 000); +PARAM_ARRAY(irq_list, irq_list, int, 1, 4, 000); +PARAM(do_sound, int, 000); /*====================================================================*/ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/pcxx.c tmp2/drivers/char/pcxx.c --- tmp/drivers/char/pcxx.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/char/pcxx.c Thu Nov 22 18:55:24 2001 @@ -114,13 +114,13 @@ MODULE_AUTHOR("Bernhard Kaindl"); MODULE_DESCRIPTION("Digiboard PC/X{i,e,eve} driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(verbose, "i"); -MODULE_PARM(debug, "i"); -MODULE_PARM(io, "1-4i"); -MODULE_PARM(membase, "1-4i"); -MODULE_PARM(memsize, "1-4i"); -MODULE_PARM(altpin, "1-4i"); -MODULE_PARM(numports, "1-4i"); +PARAM(verbose, int, 000); +PARAM(debug, int, 000); +PARAM_ARRAY(io, io, int, 1, 4, 000); +PARAM_ARRAY(membase, membase, int, 1, 4, 000); +PARAM_ARRAY(memsize, memsize, int, 1, 4, 000); +PARAM_ARRAY(altpin, altpin, int, 1, 4, 000); +PARAM_ARRAY(numports, numports, int, 1, 4, 000); # endif #endif MODULE diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/rio/rio_linux.c tmp2/drivers/char/rio/rio_linux.c --- tmp/drivers/char/rio/rio_linux.c Tue Nov 6 11:41:33 2001 +++ tmp2/drivers/char/rio/rio_linux.c Thu Nov 22 18:55:24 2001 @@ -252,9 +252,9 @@ MODULE_AUTHOR("Rogier Wolff , Patrick van de Lageweg "); MODULE_DESCRIPTION("RIO driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(rio_poll, "i"); -MODULE_PARM(rio_debug, "i"); -MODULE_PARM(rio_irqmask, "i"); +PARAM(rio_poll, int, 000); +PARAM(rio_debug, int, 000); +PARAM(rio_irqmask, long, 000); #endif static struct real_driver rio_real_driver = { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/riscom8.c tmp2/drivers/char/riscom8.c --- tmp/drivers/char/riscom8.c Fri Sep 14 08:21:32 2001 +++ tmp2/drivers/char/riscom8.c Thu Nov 22 18:55:24 2001 @@ -1847,7 +1847,7 @@ * addresses in this case. * */ -static int __init riscom8_setup(char *str) +static int __init riscom8_setup(char *str, struct kernel_param *kp) { int ints[RC_NBOARD]; int i; @@ -1863,7 +1863,7 @@ return 1; } -__setup("riscom8=", riscom8_setup); +PARAM_CALL(riscom8, riscom8_setup, NULL); #endif static char banner[] __initdata = @@ -1902,10 +1902,10 @@ static int iobase1; static int iobase2; static int iobase3; -MODULE_PARM(iobase, "i"); -MODULE_PARM(iobase1, "i"); -MODULE_PARM(iobase2, "i"); -MODULE_PARM(iobase3, "i"); +PARAM(iobase, int, 000); +PARAM(iobase1, int, 000); +PARAM(iobase2, int, 000); +PARAM(iobase3, int, 000); MODULE_LICENSE("GPL"); #endif /* MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/rocket.c tmp2/drivers/char/rocket.c --- tmp/drivers/char/rocket.c Sat Sep 22 03:55:22 2001 +++ tmp2/drivers/char/rocket.c Thu Nov 22 18:55:24 2001 @@ -158,17 +158,17 @@ MODULE_AUTHOR("Theodore Ts'o"); MODULE_DESCRIPTION("Comtrol Rocketport driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(board1, "i"); +PARAM(board1, ulong, 000); MODULE_PARM_DESC(board1, "I/O port for (ISA) board #1"); -MODULE_PARM(board2, "i"); +PARAM(board2, ulong, 000); MODULE_PARM_DESC(board2, "I/O port for (ISA) board #2"); -MODULE_PARM(board3, "i"); +PARAM(board3, ulong, 000); MODULE_PARM_DESC(board3, "I/O port for (ISA) board #3"); -MODULE_PARM(board4, "i"); +PARAM(board4, ulong, 000); MODULE_PARM_DESC(board4, "I/O port for (ISA) board #4"); -MODULE_PARM(controller, "i"); +PARAM(controller, ulong, 000); MODULE_PARM_DESC(controller, "I/O port for (ISA) rocketport controller"); -MODULE_PARM(support_low_speed, "i"); +PARAM(support_low_speed, ulong, 000); MODULE_PARM_DESC(support_low_speed, "0 means support 50 baud, 1 means support 460400 baud"); #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/serial.c tmp2/drivers/char/serial.c --- tmp/drivers/char/serial.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/char/serial.c Thu Nov 22 18:55:24 2001 @@ -315,9 +315,9 @@ static int probe_rsa[PORT_RSA_MAX]; static int force_rsa[PORT_RSA_MAX]; -MODULE_PARM(probe_rsa, "1-" __MODULE_STRING(PORT_RSA_MAX) "i"); +PARAM_ARRAY(probe_rsa, probe_rsa, int, 1, PORT_RSA_MAX, 000); MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA"); -MODULE_PARM(force_rsa, "1-" __MODULE_STRING(PORT_RSA_MAX) "i"); +PARAM_ARRAY(force_rsa, force_rsa, int, 1, PORT_RSA_MAX, 000); MODULE_PARM_DESC(force_rsa, "Force I/O ports for RSA"); #endif /* CONFIG_SERIAL_RSA */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/sh-sci.c tmp2/drivers/char/sh-sci.c --- tmp/drivers/char/sh-sci.c Tue Oct 16 06:36:48 2001 +++ tmp2/drivers/char/sh-sci.c Thu Nov 22 18:55:24 2001 @@ -89,7 +89,7 @@ static int sci_debug = 0; #ifdef MODULE -MODULE_PARM(sci_debug, "i"); +PARAM(sci_debug, int, 000); #endif #define dprintk(x...) do { if (sci_debug) printk(x); } while(0) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/softdog.c tmp2/drivers/char/softdog.c --- tmp/drivers/char/softdog.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/char/softdog.c Thu Nov 22 18:55:24 2001 @@ -45,7 +45,7 @@ static int soft_margin = TIMER_MARGIN; /* in seconds */ -MODULE_PARM(soft_margin,"i"); +PARAM(soft_margin, int, 000); MODULE_LICENSE("GPL"); /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/sonypi.c tmp2/drivers/char/sonypi.c --- tmp/drivers/char/sonypi.c Tue Oct 16 01:38:31 2001 +++ tmp2/drivers/char/sonypi.c Thu Nov 22 18:55:24 2001 @@ -689,33 +689,6 @@ sonypi_remove(); } -#ifndef MODULE -static int __init sonypi_setup(char *str) { - int ints[6]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - if (ints[0] <= 0) - goto out; - minor = ints[1]; - if (ints[0] == 1) - goto out; - verbose = ints[2]; - if (ints[0] == 2) - goto out; - fnkeyinit = ints[3]; - if (ints[0] == 3) - goto out; - camera = ints[4]; - if (ints[0] == 4) - goto out; - compat = ints[5]; -out: - return 1; -} - -__setup("sonypi=", sonypi_setup); -#endif /* !MODULE */ - /* Module entry points */ module_init(sonypi_init_module); module_exit(sonypi_cleanup_module); @@ -725,15 +698,15 @@ MODULE_LICENSE("GPL"); -MODULE_PARM(minor,"i"); +PARAM(minor, int, 000); MODULE_PARM_DESC(minor, "minor number of the misc device, default is -1 (automatic)"); -MODULE_PARM(verbose,"i"); +PARAM(verbose, int, 000); MODULE_PARM_DESC(verbose, "be verbose, default is 0 (no)"); -MODULE_PARM(fnkeyinit,"i"); +PARAM(fnkeyinit, int, 000); MODULE_PARM_DESC(fnkeyinit, "set this if your Fn keys do not generate any event"); -MODULE_PARM(camera,"i"); +PARAM(camera, int, 000); MODULE_PARM_DESC(camera, "set this if you have a MotionEye camera (PictureBook series)"); -MODULE_PARM(compat,"i"); +PARAM(compat, bool, 000); MODULE_PARM_DESC(compat, "set this if you want to enable backward compatibility mode"); EXPORT_SYMBOL(sonypi_camera_command); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/specialix.c tmp2/drivers/char/specialix.c --- tmp/drivers/char/specialix.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/char/specialix.c Thu Nov 22 18:55:24 2001 @@ -93,6 +93,7 @@ #include #include #include +#include /* ************************************************************** */ @@ -2402,8 +2403,8 @@ int irq [SX_NBOARD] = {0,}; -MODULE_PARM(iobase,"1-" __MODULE_STRING(SX_NBOARD) "i"); -MODULE_PARM(irq,"1-" __MODULE_STRING(SX_NBOARD) "i"); +PARAM_ARRAY(iobase, iobase, int, 1, SX_NBOARD, 000); +PARAM_ARRAY(irq, irq, int, 1, SX_NBOARD, 000); /* * You can setup up to 4 boards. diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/stallion.c tmp2/drivers/char/stallion.c --- tmp/drivers/char/stallion.c Sat Sep 22 03:55:23 2001 +++ tmp2/drivers/char/stallion.c Thu Nov 22 18:55:24 2001 @@ -321,13 +321,13 @@ MODULE_DESCRIPTION("Stallion Multiport Serial Driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(board0, "1-4s"); +PARAM_ARRAY(board0, board0, charp, 1, 4, S_IRUGO); MODULE_PARM_DESC(board0, "Board 0 config -> name[,ioaddr[,ioaddr2][,irq]]"); -MODULE_PARM(board1, "1-4s"); +PARAM_ARRAY(board1, board1, charp, 1, 4, S_IRUGO); MODULE_PARM_DESC(board1, "Board 1 config -> name[,ioaddr[,ioaddr2][,irq]]"); -MODULE_PARM(board2, "1-4s"); +PARAM_ARRAY(board2, board2, charp, 1, 4, S_IRUGO); MODULE_PARM_DESC(board2, "Board 2 config -> name[,ioaddr[,ioaddr2][,irq]]"); -MODULE_PARM(board3, "1-4s"); +PARAM_ARRAY(board3, board3, charp, 1, 4, S_IRUGO); MODULE_PARM_DESC(board3, "Board 3 config -> name[,ioaddr[,ioaddr2][,irq]]"); #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/sx.c tmp2/drivers/char/sx.c --- tmp/drivers/char/sx.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/char/sx.c Thu Nov 22 18:55:24 2001 @@ -362,13 +362,13 @@ Some architectures may need more. */ static int sx_irqmask = -1; -MODULE_PARM(sx_probe_addrs, "i"); -MODULE_PARM(si_probe_addrs, "i"); -MODULE_PARM(sx_poll, "i"); -MODULE_PARM(sx_slowpoll, "i"); -MODULE_PARM(sx_maxints, "i"); -MODULE_PARM(sx_debug, "i"); -MODULE_PARM(sx_irqmask, "i"); +PARAM_NAMED(sx_probe_addrs, sx_probe_addrs[0], int, 000); +PARAM_NAMED(si_probe_addrs, si_probe_addrs[0], int, 000); +PARAM(sx_poll, int, 000); +PARAM(sx_slowpoll, int, 000); +PARAM(sx_maxints, int, 000); +PARAM(sx_debug, int, 000); +PARAM(sx_irqmask, int, 000); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/synclink.c tmp2/drivers/char/synclink.c --- tmp/drivers/char/synclink.c Sat Sep 15 07:39:59 2001 +++ tmp2/drivers/char/synclink.c Thu Nov 22 18:55:24 2001 @@ -909,17 +909,17 @@ static int txdmabufs[MAX_TOTAL_DEVICES]; static int txholdbufs[MAX_TOTAL_DEVICES]; -MODULE_PARM(break_on_load,"i"); -MODULE_PARM(ttymajor,"i"); -MODULE_PARM(cuamajor,"i"); -MODULE_PARM(io,"1-" __MODULE_STRING(MAX_ISA_DEVICES) "i"); -MODULE_PARM(irq,"1-" __MODULE_STRING(MAX_ISA_DEVICES) "i"); -MODULE_PARM(dma,"1-" __MODULE_STRING(MAX_ISA_DEVICES) "i"); -MODULE_PARM(debug_level,"i"); -MODULE_PARM(maxframe,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); -MODULE_PARM(dosyncppp,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); -MODULE_PARM(txdmabufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); -MODULE_PARM(txholdbufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); +PARAM(break_on_load, int, 000); +PARAM(ttymajor, int, 000); +PARAM(cuamajor, int, 000); +PARAM_ARRAY(io, io, int, 1, MAX_ISA_DEVICES, 000); +PARAM_ARRAY(irq, irq, int, 1, MAX_ISA_DEVICES, 000); +PARAM_ARRAY(dma, dma, int, 1, MAX_ISA_DEVICES, 000); +PARAM(debug_level, int, 000); +PARAM_ARRAY(maxframe, maxframe, int, 1, MAX_TOTAL_DEVICES, 000); +PARAM_ARRAY(dosyncppp, dosyncppp, int, 1, MAX_TOTAL_DEVICES, 000); +PARAM_ARRAY(txdmabufs, txdmabufs, int, 1, MAX_TOTAL_DEVICES, 000); +PARAM_ARRAY(txholdbufs, txholdbufs, int, 1, MAX_TOTAL_DEVICES, 000); static char *driver_name = "SyncLink serial driver"; static char *driver_version = "$Revision: 3.12 $"; @@ -3126,8 +3126,11 @@ case MGSL_IOCLOOPTXDONE: return mgsl_loopmode_send_done(info); case MGSL_IOCCLRMODCOUNT: - while(MOD_IN_USE) - MOD_DEC_USE_COUNT; +#ifdef CONFIG_MODULE_UNLOAD + /* This is totally evil --RR */ + while (atomic_read(&__this_module.use) != 1) + module_put(&__this_module); +#endif return 0; /* Wait for modem input (DCD,RI,DSR,CTS) change @@ -3334,8 +3337,7 @@ if (debug_level >= DEBUG_LEVEL_INFO) printk("%s(%d):mgsl_close(%s) exit, count=%d\n", __FILE__,__LINE__, tty->driver.name, info->count); - if(MOD_IN_USE) - MOD_DEC_USE_COUNT; + MOD_DEC_USE_COUNT; } /* end of mgsl_close() */ @@ -3695,8 +3697,7 @@ cleanup: if (retval) { - if(MOD_IN_USE) - MOD_DEC_USE_COUNT; + MOD_DEC_USE_COUNT; if(info->count) info->count--; } diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/toshiba.c tmp2/drivers/char/toshiba.c --- tmp/drivers/char/toshiba.c Fri Oct 12 02:04:57 2001 +++ tmp2/drivers/char/toshiba.c Thu Nov 22 18:55:24 2001 @@ -82,7 +82,7 @@ static int tosh_fn = 0; -MODULE_PARM(tosh_fn, "i"); +PARAM(tosh_fn, int, 000); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/wdt.c tmp2/drivers/char/wdt.c --- tmp/drivers/char/wdt.c Sat Sep 8 02:28:38 2001 +++ tmp2/drivers/char/wdt.c Thu Nov 22 18:55:24 2001 @@ -54,7 +54,7 @@ /* * You must set these - there is no sane way to probe for this board. - * You can use wdt=x,y to set these now. + * You can use wdt.io= and wdt.irq to set these now. */ static int io=0x240; @@ -62,40 +62,9 @@ #define WD_TIMO (100*60) /* 1 minute */ -#ifndef MODULE - -/** - * wdt_setup: - * @str: command line string - * - * Setup options. The board isn't really probe-able so we have to - * get the user to tell us the configuration. Sane people build it - * modular but the others come here. - */ - -static int __init wdt_setup(char *str) -{ - int ints[4]; - - str = get_options (str, ARRAY_SIZE(ints), ints); - - if (ints[0] > 0) - { - io = ints[1]; - if(ints[0] > 1) - irq = ints[2]; - } - - return 1; -} - -__setup("wdt=", wdt_setup); - -#endif /* !MODULE */ - -MODULE_PARM(io, "i"); +PARAM(io, int, 000); MODULE_PARM_DESC(io, "WDT io port (default=0x240)"); -MODULE_PARM(irq, "i"); +PARAM(irq, int, 000); MODULE_PARM_DESC(irq, "WDT irq (default=11)"); /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/wdt285.c tmp2/drivers/char/wdt285.c --- tmp/drivers/char/wdt285.c Sat Sep 8 02:28:38 2001 +++ tmp2/drivers/char/wdt285.c Thu Nov 22 18:55:24 2001 @@ -192,7 +192,7 @@ MODULE_DESCRIPTION("21285 watchdog driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(soft_margin,"i"); +PARAM(soft_margin, int, 000); MODULE_PARM_DESC(soft_margin,"Watchdog timeout in seconds"); module_init(footbridge_watchdog_init); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/char/wdt_pci.c tmp2/drivers/char/wdt_pci.c --- tmp/drivers/char/wdt_pci.c Sat Sep 8 02:28:38 2001 +++ tmp2/drivers/char/wdt_pci.c Thu Nov 22 18:55:24 2001 @@ -75,7 +75,7 @@ /* * You must set these - there is no sane way to probe for this board. - * You can use wdt=x,y to set these now. + * You can use wdt-pci.io= and wdt-pci.irq to set these now. */ static int io=0x240; @@ -83,36 +83,8 @@ #define WD_TIMO (100*60) /* 1 minute */ -#ifndef MODULE - -/** - * wdtpci_setup: - * @str: command line string - * - * Setup options. The board isn't really probe-able so we have to - * get the user to tell us the configuration. Sane people build it - * modular but the others come here. - */ - -static int __init wdtpci_setup(char *str) -{ - int ints[4]; - - str = get_options (str, ARRAY_SIZE(ints), ints); - - if (ints[0] > 0) - { - io = ints[1]; - if(ints[0] > 1) - irq = ints[2]; - } - - return 1; -} - -__setup("wdt=", wdtpci_setup); - -#endif /* !MODULE */ +PARAM(io, int, S_IRUGO); +PARAM(irq, int, S_IRUGO); /* * Programming support diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/i2c/i2c-adap-ite.c tmp2/drivers/i2c/i2c-adap-ite.c --- tmp/drivers/i2c/i2c-adap-ite.c Fri Oct 12 01:05:47 2001 +++ tmp2/drivers/i2c/i2c-adap-ite.c Thu Nov 22 18:55:24 2001 @@ -301,11 +301,11 @@ MODULE_DESCRIPTION("I2C-Bus adapter routines for ITE IIC bus adapter"); MODULE_LICENSE("GPL"); -MODULE_PARM(base, "i"); -MODULE_PARM(irq, "i"); -MODULE_PARM(clock, "i"); -MODULE_PARM(own, "i"); -MODULE_PARM(i2c_debug,"i"); +PARAM(base, int, 000); +PARAM(irq, int, 000); +PARAM(clock, int, 000); +PARAM(own, int, 000); +PARAM(i2c_debug, int, 000); /* Called when module is loaded or when kernel is intialized. diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/i2c/i2c-algo-bit.c tmp2/drivers/i2c/i2c-algo-bit.c --- tmp/drivers/i2c/i2c-algo-bit.c Fri Oct 12 01:05:47 2001 +++ tmp2/drivers/i2c/i2c-algo-bit.c Thu Nov 22 18:55:24 2001 @@ -623,9 +623,9 @@ MODULE_DESCRIPTION("I2C-Bus bit-banging algorithm"); MODULE_LICENSE("GPL"); -MODULE_PARM(bit_test, "i"); -MODULE_PARM(bit_scan, "i"); -MODULE_PARM(i2c_debug,"i"); +PARAM(bit_test, int, 000); +PARAM(bit_scan, int, 000); +PARAM(i2c_debug, int, 000); MODULE_PARM_DESC(bit_test, "Test the lines of the bus to see if it is stuck"); MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/i2c/i2c-algo-ite.c tmp2/drivers/i2c/i2c-algo-ite.c --- tmp/drivers/i2c/i2c-algo-ite.c Fri Oct 12 01:05:47 2001 +++ tmp2/drivers/i2c/i2c-algo-ite.c Thu Nov 22 18:55:24 2001 @@ -846,9 +846,9 @@ MODULE_DESCRIPTION("ITE iic algorithm"); MODULE_LICENSE("GPL"); -MODULE_PARM(iic_test, "i"); -MODULE_PARM(iic_scan, "i"); -MODULE_PARM(i2c_debug,"i"); +PARAM(iic_test, int, 000); +PARAM(iic_scan, int, 000); +PARAM(i2c_debug, int, 000); MODULE_PARM_DESC(iic_test, "Test if the I2C bus is available"); MODULE_PARM_DESC(iic_scan, "Scan for active chips on the bus"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/i2c/i2c-algo-pcf.c tmp2/drivers/i2c/i2c-algo-pcf.c --- tmp/drivers/i2c/i2c-algo-pcf.c Fri Oct 12 01:05:47 2001 +++ tmp2/drivers/i2c/i2c-algo-pcf.c Thu Nov 22 18:55:24 2001 @@ -537,8 +537,8 @@ MODULE_DESCRIPTION("I2C-Bus PCF8584 algorithm"); MODULE_LICENSE("GPL"); -MODULE_PARM(pcf_scan, "i"); -MODULE_PARM(i2c_debug,"i"); +PARAM(pcf_scan, int, 000); +PARAM(i2c_debug, int, 000); MODULE_PARM_DESC(pcf_scan, "Scan for active chips on the bus"); MODULE_PARM_DESC(i2c_debug, diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/i2c/i2c-core.c tmp2/drivers/i2c/i2c-core.c --- tmp/drivers/i2c/i2c-core.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/i2c/i2c-core.c Thu Nov 22 18:55:24 2001 @@ -1408,7 +1408,7 @@ #ifdef MODULE MODULE_AUTHOR("Simon G. Vogl "); MODULE_DESCRIPTION("I2C-Bus main module"); -MODULE_PARM(i2c_debug, "i"); +PARAM(i2c_debug, int, 000); MODULE_PARM_DESC(i2c_debug,"debug level"); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/i2c/i2c-elektor.c tmp2/drivers/i2c/i2c-elektor.c --- tmp/drivers/i2c/i2c-elektor.c Fri Oct 12 01:05:47 2001 +++ tmp2/drivers/i2c/i2c-elektor.c Thu Nov 22 18:55:24 2001 @@ -302,12 +302,11 @@ MODULE_DESCRIPTION("I2C-Bus adapter routines for PCF8584 ISA bus adapter"); MODULE_LICENSE("GPL"); -MODULE_PARM(base, "i"); -MODULE_PARM(irq, "i"); -MODULE_PARM(clock, "i"); -MODULE_PARM(own, "i"); -MODULE_PARM(mmapped, "i"); -MODULE_PARM(i2c_debug, "i"); +PARAM(base, int, 000); +PARAM(irq, int, 000); +PARAM(clock, int, 000); +PARAM(own, int, 000); +PARAM(i2c_debug, int, 000); int init_module(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/i2c/i2c-elv.c tmp2/drivers/i2c/i2c-elv.c --- tmp/drivers/i2c/i2c-elv.c Fri Oct 12 01:05:47 2001 +++ tmp2/drivers/i2c/i2c-elv.c Thu Nov 22 18:55:24 2001 @@ -203,7 +203,7 @@ MODULE_LICENSE("GPL"); -MODULE_PARM(base, "i"); +PARAM(base, int, 000); int init_module(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/i2c/i2c-philips-par.c tmp2/drivers/i2c/i2c-philips-par.c --- tmp/drivers/i2c/i2c-philips-par.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/i2c/i2c-philips-par.c Thu Nov 22 18:55:24 2001 @@ -293,7 +293,7 @@ MODULE_DESCRIPTION("I2C-Bus adapter routines for Philips parallel port adapter"); MODULE_LICENSE("GPL"); -MODULE_PARM(type, "i"); +PARAM(type, int, 000); #ifdef MODULE int init_module(void) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/i2c/i2c-velleman.c tmp2/drivers/i2c/i2c-velleman.c --- tmp/drivers/i2c/i2c-velleman.c Fri Oct 12 01:05:47 2001 +++ tmp2/drivers/i2c/i2c-velleman.c Thu Nov 22 18:55:24 2001 @@ -191,7 +191,7 @@ MODULE_DESCRIPTION("I2C-Bus adapter routines for Velleman K8000 adapter"); MODULE_LICENSE("GPL"); -MODULE_PARM(base, "i"); +PARAM(base, int, 000); int init_module(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/ide/hd.c tmp2/drivers/ide/hd.c --- tmp/drivers/ide/hd.c Tue Oct 16 06:27:42 2001 +++ tmp2/drivers/ide/hd.c Thu Nov 22 18:55:24 2001 @@ -906,13 +906,13 @@ return 0; } -static int parse_hd_setup (char *line) { +static int parse_hd_setup (char *line, struct kernel_param *kp) { int ints[6]; (void) get_options(line, ARRAY_SIZE(ints), ints); hd_setup(NULL, ints); - return 1; + return 0; } -__setup("hd=", parse_hd_setup); +PARAM_CALL(hd, parse_hd_setup, NULL); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/ide/ide-cd.c tmp2/drivers/ide/ide-cd.c --- tmp/drivers/ide/ide-cd.c Tue Nov 6 11:41:34 2001 +++ tmp2/drivers/ide/ide-cd.c Thu Nov 22 18:55:24 2001 @@ -2993,9 +2993,9 @@ }; /* options */ -char *ignore = NULL; +static char *ignore = NULL; -MODULE_PARM(ignore, "s"); +PARAM(ignore, charp, 000); MODULE_DESCRIPTION("ATAPI CD-ROM Driver"); static void __exit ide_cdrom_exit(void) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/ide/ide-cs.c tmp2/drivers/ide/ide-cs.c --- tmp/drivers/ide/ide-cs.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/ide/ide-cs.c Thu Nov 22 18:55:24 2001 @@ -55,7 +55,7 @@ #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); +PARAM(pc_debug, int, 000); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) static char *version = "ide_cs.c 1.26 1999/11/16 02:10:49 (David Hinds)"; @@ -65,14 +65,14 @@ /*====================================================================*/ -/* Parameters that can be set with 'insmod' */ +/* Parameters */ /* Bit map of interrupts to choose from */ static u_int irq_mask = 0xdeb8; static int irq_list[4] = { -1 }; -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); +PARAM(irq_mask, int, 000); +PARAM_ARRAY(irq_list, irq_list, int, 1, 4, 000); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/ide/ide.c tmp2/drivers/ide/ide.c --- tmp/drivers/ide/ide.c Tue Nov 6 11:41:34 2001 +++ tmp2/drivers/ide/ide.c Thu Nov 22 18:55:24 2001 @@ -2873,39 +2873,37 @@ static const char *hex = "0123456789abcdef"; int i, n; - if (*s++ == '=') { - /* - * Try matching against the supplied keywords, - * and return -(index+1) if we match one - */ - if (keywords != NULL) { - for (i = 0; *keywords != NULL; ++i) { - if (!strcmp(s, *keywords++)) - return -(i+1); - } + /* + * Try matching against the supplied keywords, + * and return -(index+1) if we match one + */ + if (keywords != NULL) { + for (i = 0; *keywords != NULL; ++i) { + if (!strcmp(s, *keywords++)) + return -(i+1); } - /* - * Look for a series of no more than "max_vals" - * numeric values separated by commas, in base10, - * or base16 when prefixed with "0x". - * Return a count of how many were found. - */ - for (n = 0; (i = stridx(decimal, *s)) >= 0;) { - vals[n] = i; - while ((i = stridx(decimal, *++s)) >= 0) - vals[n] = (vals[n] * 10) + i; - if (*s == 'x' && !vals[n]) { - while ((i = stridx(hex, *++s)) >= 0) - vals[n] = (vals[n] * 0x10) + i; - } - if (++n == max_vals) - break; - if (*s == ',' || *s == ';') - ++s; + } + /* + * Look for a series of no more than "max_vals" + * numeric values separated by commas, in base10, + * or base16 when prefixed with "0x". + * Return a count of how many were found. + */ + for (n = 0; (i = stridx(decimal, *s)) >= 0;) { + vals[n] = i; + while ((i = stridx(decimal, *++s)) >= 0) + vals[n] = (vals[n] * 10) + i; + if (*s == 'x' && !vals[n]) { + while ((i = stridx(hex, *++s)) >= 0) + vals[n] = (vals[n] * 0x10) + i; } - if (!*s) - return n; + if (++n == max_vals) + break; + if (*s == ',' || *s == ';') + ++s; } + if (!*s) + return n; return 0; /* zero = nothing matched */ } @@ -2989,7 +2987,7 @@ * "idex=dc4030" : probe/support Promise DC4030VL interface * "ide=doubler" : probe/support IDE doublers on Amiga */ -int __init ide_setup (char *s) +int __init ide_setup (char *s, struct kernel_param *kp) { int i, vals[3]; ide_hwif_t *hwif; @@ -2999,63 +2997,56 @@ const char max_hwif = '0' + (MAX_HWIFS - 1); - if (strncmp(s,"hd",2) == 0 && s[2] == '=') /* hd= is for hd.c */ - return 0; /* driver and not us */ - - if (strncmp(s,"ide",3) && - strncmp(s,"idebus",6) && - strncmp(s,"hd",2)) /* hdx= & hdxlun= */ - return 0; - printk("ide_setup: %s", s); init_ide_data (); #ifdef CONFIG_BLK_DEV_IDEDOUBLER - if (!strcmp(s, "ide=doubler")) { + if (!strcmp(kp->name, "ide") && !strcmp(s, "doubler")) { extern int ide_doubler; printk(" : Enabled support for IDE doublers\n"); ide_doubler = 1; - return 1; + return 0; } #endif /* CONFIG_BLK_DEV_IDEDOUBLER */ - if (!strcmp(s, "ide=nodma")) { + if (!strcmp(kp->name, "ide") && !strcmp(s, "nodma")) { printk("IDE: Prevented DMA\n"); noautodma = 1; - return 1; + return 0; } #ifdef CONFIG_BLK_DEV_IDEPCI - if (!strcmp(s, "ide=reverse")) { + if (!strcmp(kp->name, "ide") && !strcmp(s, "reverse")) { ide_scan_direction = 1; printk(" : Enabled support for IDE inverse scan order.\n"); - return 1; + return 0; } #endif /* CONFIG_BLK_DEV_IDEPCI */ /* * Look for drive options: "hdx=" */ - if (s[0] == 'h' && s[1] == 'd' && s[2] >= 'a' && s[2] <= max_drive) { + if (kp->name[0] == 'h' && kp->name[1] == 'd' + && kp->name[2] >= 'a' && kp->name[2] <= max_drive) { const char *hd_words[] = {"none", "noprobe", "nowerr", "cdrom", "serialize", "autotune", "noautotune", "slow", "swapdata", "bswap", "flash", "remap", "noremap", "scsi", NULL}; - unit = s[2] - 'a'; + unit = kp->name[2] - 'a'; hw = unit / MAX_DRIVES; unit = unit % MAX_DRIVES; hwif = &ide_hwifs[hw]; drive = &hwif->drives[unit]; - if (strncmp(s + 4, "ide-", 4) == 0) { - strncpy(drive->driver_req, s + 4, 9); + if (strncmp(s, "ide-", 4) == 0) { + strncpy(drive->driver_req, s, 9); goto done; } /* * Look for last lun option: "hdxlun=" */ - if (s[3] == 'l' && s[4] == 'u' && s[5] == 'n') { - if (match_parm(&s[6], NULL, vals, 1) != 1) + if (!strcmp(kp->name, "hdxlun")) { + if (match_parm(s, NULL, vals, 1) != 1) goto bad_option; if (vals[0] >= 0 && vals[0] <= 7) { drive->last_lun = vals[0]; @@ -3064,7 +3055,7 @@ printk(" -- BAD LAST LUN! Expected value from 0 to 7"); goto done; } - switch (match_parm(&s[3], hd_words, vals, 3)) { + switch (match_parm(s, hd_words, vals, 3)) { case -1: /* "none" */ drive->nobios = 1; /* drop into "noprobe" */ case -2: /* "noprobe" */ @@ -3126,13 +3117,13 @@ } } - if (s[0] != 'i' || s[1] != 'd' || s[2] != 'e') + if (kp->name[0] != 'i' || kp->name[1] != 'd' || kp->name[2] != 'e') goto bad_option; /* * Look for bus speed option: "idebus=" */ - if (s[3] == 'b' && s[4] == 'u' && s[5] == 's') { - if (match_parm(&s[6], NULL, vals, 1) != 1) + if (!strcmp(kp->name, "idebus")) { + if (match_parm(s, NULL, vals, 1) != 1) goto bad_option; if (vals[0] >= 20 && vals[0] <= 66) { idebus_parameter = vals[0]; @@ -3143,7 +3134,7 @@ /* * Look for interface options: "idex=" */ - if (s[3] >= '0' && s[3] <= max_hwif) { + if (kp->name[3] >= '0' && kp->name[3] <= max_hwif) { /* * Be VERY CAREFUL changing this: note hardcoded indexes below * -8,-9,-10 : are reserved for future idex calls to ease the hardcoding. @@ -3152,9 +3143,9 @@ "noprobe", "serialize", "autotune", "noautotune", "reset", "dma", "ata66", "minus8", "minus9", "minus10", "four", "qd65xx", "ht6560b", "cmd640_vlb", "dtc2278", "umc8672", "ali14xx", "dc4030", NULL }; - hw = s[3] - '0'; + hw = kp->name[3] - '0'; hwif = &ide_hwifs[hw]; - i = match_parm(&s[4], ide_words, vals, 3); + i = match_parm(s, ide_words, vals, 3); /* * Cryptic check to ensure chipset not already set for hwif: @@ -3291,17 +3282,17 @@ case 0: goto bad_option; default: printk(" -- SUPPORT NOT CONFIGURED IN THIS KERNEL\n"); - return 1; + return -ENOSYS; } } bad_option: printk(" -- BAD OPTION\n"); - return 1; + return -EINVAL; bad_hwif: printk("-- NOT SUPPORTED ON ide%d", hw); done: printk("\n"); - return 1; + return -ENOSYS; } /* @@ -3741,27 +3732,10 @@ } #ifdef MODULE -char *options = NULL; -MODULE_PARM(options,"s"); MODULE_LICENSE("GPL"); -static void __init parse_options (char *line) -{ - char *next = line; - - if (line == NULL || !*line) - return; - while ((line = next) != NULL) { - if ((next = strchr(line,' ')) != NULL) - *next++ = 0; - if (!ide_setup(line)) - printk ("Unknown option '%s'\n", line); - } -} - int init_module (void) { - parse_options(options); return ide_init(); } @@ -3782,9 +3756,20 @@ #endif devfs_unregister (ide_devfs_handle); } +#endif /* !MODULE */ -#else /* !MODULE */ - -__setup("", ide_setup); - -#endif /* MODULE */ +/* Messy, but explicit */ +PARAM_CALL(hda, ide_setup, NULL); +PARAM_CALL(hdb, ide_setup, NULL); +PARAM_CALL(hdc, ide_setup, NULL); +PARAM_CALL(hdd, ide_setup, NULL); +PARAM_CALL(hde, ide_setup, NULL); +PARAM_CALL(hdf, ide_setup, NULL); +PARAM_CALL(hdg, ide_setup, NULL); +PARAM_CALL(hdh, ide_setup, NULL); +PARAM_CALL(ide0, ide_setup, NULL); +PARAM_CALL(ide1, ide_setup, NULL); +PARAM_CALL(ide2, ide_setup, NULL); +PARAM_CALL(ide3, ide_setup, NULL); +PARAM_CALL(ide, ide_setup, NULL); +PARAM_CALL(idebus, ide_setup, NULL); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/ieee1394/ieee1394_core.c tmp2/drivers/ieee1394/ieee1394_core.c --- tmp/drivers/ieee1394/ieee1394_core.c Thu Oct 18 07:19:20 2001 +++ tmp2/drivers/ieee1394/ieee1394_core.c Thu Nov 22 18:55:24 2001 @@ -35,7 +35,7 @@ /* * Disable the nodemgr detection and config rom reading functionality. */ -MODULE_PARM(disable_nodemgr, "i"); +PARAM(disable_nodemgr, bool, 000); MODULE_PARM_DESC(disable_nodemgr, "Disable nodemgr functionality."); static int disable_nodemgr = 0; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/ieee1394/ohci1394.c tmp2/drivers/ieee1394/ohci1394.c --- tmp/drivers/ieee1394/ohci1394.c Tue Oct 2 14:24:24 2001 +++ tmp2/drivers/ieee1394/ohci1394.c Thu Nov 22 18:55:24 2001 @@ -178,9 +178,9 @@ "v0.51 08/08/01 Ben Collins "; /* Module Parameters */ -MODULE_PARM(attempt_root,"i"); -MODULE_PARM_DESC(attempt_root, "Attempt to make the host root."); static int attempt_root = 0; +PARAM(attempt_root, int, 000); +MODULE_PARM_DESC(attempt_root, "Attempt to make the host root."); static unsigned int card_id_counter = 0; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/ieee1394/pcilynx.c tmp2/drivers/ieee1394/pcilynx.c --- tmp/drivers/ieee1394/pcilynx.c Thu Nov 22 18:18:36 2001 +++ tmp2/drivers/ieee1394/pcilynx.c Thu Nov 22 18:55:24 2001 @@ -919,7 +919,7 @@ * everywhere as good as here - use mem_mindma option for modules to change */ short mem_mindma = 2400; -MODULE_PARM(mem_mindma, "h"); +PARAM(mem_mindma, short, 000); static ssize_t mem_dmaread(struct memdata *md, u32 physbuf, ssize_t count, int offset) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/ieee1394/sbp2.c tmp2/drivers/ieee1394/sbp2.c --- tmp/drivers/ieee1394/sbp2.c Thu Oct 18 07:19:20 2001 +++ tmp2/drivers/ieee1394/sbp2.c Thu Nov 22 18:55:24 2001 @@ -275,7 +275,7 @@ * does not support mode sense. Allows you to mount the media rw instead * of ro. */ -MODULE_PARM(mode_sense_hack,"i"); +PARAM(mode_sense_hack, int, 000); MODULE_PARM_DESC(mode_sense_hack, "Emulate mode sense for devices like 1394 memory stick readers"); static int mode_sense_hack = 0; @@ -292,7 +292,7 @@ * max_speed = 1 (max speed 200mb) * max_speed = 0 (max speed 100mb) */ -MODULE_PARM(max_speed,"i"); +PARAM(max_speed, int, 000); MODULE_PARM_DESC(max_speed, "Force down max speed (2 = 400mb default, 1 = 200mb, 0 = 100mb)"); static int max_speed = SPEED_400; @@ -300,7 +300,7 @@ * Set serialize_io to 1 if you'd like only one scsi command sent down to * us at a time (debugging). */ -MODULE_PARM(serialize_io,"i"); +PARAM(serialize_io, int, 000); MODULE_PARM_DESC(serialize_io, "Serialize all I/O coming down from the scsi drivers (debugging)"); static int serialize_io = 1; /* serialize I/O until stress issues are resolved */ @@ -310,7 +310,7 @@ * any individual devices with 128KB transfer size limits). Sets max s/g * list elements to 0x1f in size and disables s/g clustering. */ -MODULE_PARM(no_large_packets,"i"); +PARAM(no_large_packets, int, 000); MODULE_PARM_DESC(no_large_packets, "Do not allow large transfers from scsi drivers (debugging)"); static int no_large_packets = 0; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/input/keybdev.c tmp2/drivers/input/keybdev.c --- tmp/drivers/input/keybdev.c Fri Oct 12 02:14:32 2001 +++ tmp2/drivers/input/keybdev.c Thu Nov 22 18:55:24 2001 @@ -245,5 +245,5 @@ MODULE_AUTHOR("Vojtech Pavlik "); MODULE_DESCRIPTION("Input driver to keyboard driver binding"); -MODULE_PARM(jp_kbd_109, "i"); +PARAM(jp_kbd_109, int, 000); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/input/mousedev.c tmp2/drivers/input/mousedev.c --- tmp/drivers/input/mousedev.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/input/mousedev.c Thu Nov 22 18:55:24 2001 @@ -499,7 +499,7 @@ MODULE_DESCRIPTION("Input driver to PS/2 or ImPS/2 device driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(xres, "i"); +PARAM(xres, int, S_IRUGO); MODULE_PARM_DESC(xres, "Horizontal screen resolution"); -MODULE_PARM(yres, "i"); +PARAM(yres, int, S_IRUGO); MODULE_PARM_DESC(yres, "Vertical screen resolution"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/act2000/module.c tmp2/drivers/isdn/act2000/module.c --- tmp/drivers/isdn/act2000/module.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/isdn/act2000/module.c Thu Nov 22 18:55:24 2001 @@ -40,10 +40,10 @@ MODULE_PARM_DESC(membase, "Base port address of first card"); MODULE_PARM_DESC(act_irq, "IRQ of first card"); MODULE_PARM_DESC(act_id, "ID-String of first card"); -MODULE_PARM(act_bus, "i"); -MODULE_PARM(act_port, "i"); -MODULE_PARM(act_irq, "i"); -MODULE_PARM(act_id, "s"); +PARAM(act_bus, int, 000); +PARAM(act_port, int, 000); +PARAM(act_irq, int, 000); +PARAM(act_id, charp, 000); static int act2000_addcard(int, int, int, char *); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/avmb1/avm_cs.c tmp2/drivers/isdn/avmb1/avm_cs.c --- tmp/drivers/isdn/avmb1/avm_cs.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/isdn/avmb1/avm_cs.c Thu Nov 22 18:55:24 2001 @@ -50,7 +50,7 @@ static int default_irq_list[10] = { 15, 12, 11, 10, 9, 7, 5, 4, 3, -1 }; static int irq_list[10] = { -1 }; -MODULE_PARM(irq_list, "1-10i"); +PARAM_ARRAY(irq_list, irq_list, int, 1, 10, 000); /*====================================================================*/ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/avmb1/b1dma.c tmp2/drivers/isdn/avmb1/b1dma.c --- tmp/drivers/isdn/avmb1/b1dma.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/isdn/avmb1/b1dma.c Thu Nov 22 18:55:24 2001 @@ -41,7 +41,7 @@ MODULE_LICENSE("GPL"); static int suppress_pollack = 0; -MODULE_PARM(suppress_pollack, "0-1i"); +PARAM(suppress_pollack, bool, S_IRUGO); /* ------------------------------------------------------------- */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/avmb1/c4.c tmp2/drivers/isdn/avmb1/c4.c --- tmp/drivers/isdn/avmb1/c4.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/isdn/avmb1/c4.c Thu Nov 22 18:55:24 2001 @@ -48,7 +48,7 @@ MODULE_DESCRIPTION("CAPI4Linux: Driver for AVM C2/C4 cards"); MODULE_AUTHOR("Carsten Paeth"); MODULE_LICENSE("GPL"); -MODULE_PARM(suppress_pollack, "0-1i"); +PARAM(suppress_pollack, bool, S_IRUGO); /* ------------------------------------------------------------- */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/avmb1/capi.c tmp2/drivers/isdn/avmb1/capi.c --- tmp/drivers/isdn/avmb1/capi.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/isdn/avmb1/capi.c Thu Nov 22 18:55:24 2001 @@ -63,10 +63,10 @@ int capi_ttymajor = 191; #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ -MODULE_PARM(capi_major, "i"); +PARAM(capi_major, int, 000); #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE -MODULE_PARM(capi_rawmajor, "i"); -MODULE_PARM(capi_ttymajor, "i"); +PARAM(capi_rawmajor, int, 000); +PARAM(capi_ttymajor, int, 000); #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ /* -------- defines ------------------------------------------------- */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/avmb1/capidrv.c tmp2/drivers/isdn/avmb1/capidrv.c --- tmp/drivers/isdn/avmb1/capidrv.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/isdn/avmb1/capidrv.c Thu Nov 22 18:55:24 2001 @@ -41,7 +41,7 @@ MODULE_DESCRIPTION("CAPI4Linux: Interface to ISDN4Linux"); MODULE_AUTHOR("Carsten Paeth"); MODULE_LICENSE("GPL"); -MODULE_PARM(debugmode, "i"); +PARAM(debugmode, int, 000); /* -------- type definitions ----------------------------------------- */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/avmb1/kcapi.c tmp2/drivers/isdn/avmb1/kcapi.c --- tmp/drivers/isdn/avmb1/kcapi.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/isdn/avmb1/kcapi.c Thu Nov 22 18:55:24 2001 @@ -49,7 +49,7 @@ MODULE_DESCRIPTION("CAPI4Linux: kernel CAPI layer"); MODULE_AUTHOR("Carsten Paeth"); MODULE_LICENSE("GPL"); -MODULE_PARM(showcapimsgs, "i"); +PARAM(showcapimsgs, int, S_IRUGO); /* ------------------------------------------------------------- */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/eicon/eicon_mod.c tmp2/drivers/isdn/eicon/eicon_mod.c --- tmp/drivers/isdn/eicon/eicon_mod.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/isdn/eicon/eicon_mod.c Thu Nov 22 18:55:24 2001 @@ -77,12 +77,12 @@ MODULE_AUTHOR( "Armin Schindler"); MODULE_LICENSE( "GPL"); MODULE_PARM_DESC(id, "ID-String of first card"); -MODULE_PARM(id, "s"); +PARAM(id, charp, S_IRUGO); #ifdef CONFIG_ISDN_DRV_EICON_ISA MODULE_PARM_DESC(membase, "Base address of first ISA card"); MODULE_PARM_DESC(irq, "IRQ of first card"); -MODULE_PARM(membase, "i"); -MODULE_PARM(irq, "i"); +PARAM(membase, int, S_IRUGO); +PARAM(irq, int, S_IRUGO); #endif char *eicon_ctype_name[] = { @@ -1453,49 +1453,6 @@ #endif /* CONFIG_PCI */ printk(KERN_INFO "%s unloaded\n", DRIVERNAME); } - -#ifndef MODULE - -static int __init -eicon_setup(char *line) -{ - int i, argc; - int ints[5]; - char *str; - - str = get_options(line, 4, ints); - - argc = ints[0]; - i = 1; -#ifdef CONFIG_ISDN_DRV_EICON_ISA - if (argc) { - membase = irq = -1; - if (argc) { - membase = ints[i]; - i++; - argc--; - } - if (argc) { - irq = ints[i]; - i++; - argc--; - } - if (strlen(str)) { - strcpy(id, str); - } else { - strcpy(id, "eicon"); - } - printk(KERN_INFO "Eicon ISDN active driver setup (id=%s membase=0x%x irq=%d)\n", - id, membase, irq); - } -#else - printk(KERN_INFO "Eicon ISDN active driver setup\n"); -#endif - return(1); -} -__setup("eicon=", eicon_setup); - -#endif /* MODULE */ #ifdef CONFIG_ISDN_DRV_EICON_ISA #ifdef CONFIG_MCA diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/hisax/callc.c tmp2/drivers/isdn/hisax/callc.c --- tmp/drivers/isdn/hisax/callc.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/isdn/hisax/callc.c Thu Nov 22 18:55:24 2001 @@ -22,9 +22,13 @@ #include "hisax.h" #include "../avmb1/capicmd.h" /* this should be moved in a common place */ -#ifdef MODULE -#define MOD_USE_COUNT ( GET_USE_COUNT (&__this_module)) -#endif /* MODULE */ +#if defined(MODULE) && defined(CONFIG_MODULE_UNLOAD) +#define MOD_USE_COUNT atomic_read(&__this_module.use) +#define SET_MOD_USE(x) atomic_set(&__this_module.use, (x)) +#else +#define MOD_USE_COUNT 0 +#define SET_MOD_USE(x) +#endif /* MODULE and UNLOAD */ const char *lli_revision = "$Revision: 2.51.6.6 $"; @@ -1703,7 +1707,7 @@ break; #ifdef MODULE case (55): - MOD_USE_COUNT = 0; + SET_MOD_USE(0); HiSax_mod_inc_use_count(NULL); break; #endif /* MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/hisax/config.c tmp2/drivers/isdn/hisax/config.c --- tmp/drivers/isdn/hisax/config.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/isdn/hisax/config.c Thu Nov 22 18:55:24 2001 @@ -376,15 +376,15 @@ MODULE_DESCRIPTION("ISDN4Linux: Driver for passive ISDN cards"); MODULE_AUTHOR("Karsten Keil"); MODULE_LICENSE("GPL"); -MODULE_PARM(type, "1-8i"); -MODULE_PARM(protocol, "1-8i"); -MODULE_PARM(io, "1-8i"); -MODULE_PARM(irq, "1-8i"); -MODULE_PARM(mem, "1-8i"); -MODULE_PARM(id, "s"); +PARAM_ARRAY(type, type, int, 1, 8, 000); +PARAM_ARRAY(protocol, protocol, int, 1, 8, 000); +PARAM_ARRAY(io, io, int, 1, 8, 000); +PARAM_ARRAY(irq, irq, int, 1, 8, 000); +PARAM_ARRAY(mem, mem, int, 1, 8, 000); +PARAM(id, charp, 000); #ifdef IO0_IO1 -MODULE_PARM(io0, "1-8i"); -MODULE_PARM(io1, "1-8i"); +PARAM_ARRAY(io0, io0, int, 1, 8, 000); +PARAM_ARRAY(io1, io1, int, 1, 8, 000); #endif #endif /* MODULE */ @@ -433,60 +433,6 @@ HiSax_getrev(tmp)); certification_check(1); } - -#ifndef MODULE -#define MAX_ARG (HISAX_MAX_CARDS*5) -static int __init HiSax_setup(char *line) -{ - int i, j, argc; - int ints[MAX_ARG + 1]; - char *str; - - str = get_options(line, MAX_ARG, ints); - argc = ints[0]; - printk(KERN_DEBUG "HiSax_setup: argc(%d) str(%s)\n", argc, str); - i = 0; - j = 1; - while (argc && (i < HISAX_MAX_CARDS)) { - if (argc) { - cards[i].typ = ints[j]; - j++; - argc--; - } - if (argc) { - cards[i].protocol = ints[j]; - j++; - argc--; - } - if (argc) { - cards[i].para[0] = ints[j]; - j++; - argc--; - } - if (argc) { - cards[i].para[1] = ints[j]; - j++; - argc--; - } - if (argc) { - cards[i].para[2] = ints[j]; - j++; - argc--; - } - i++; - } - if (str && *str) { - strcpy(HiSaxID, str); - HiSax_id = HiSaxID; - } else { - strcpy(HiSaxID, "HiSax"); - HiSax_id = HiSaxID; - } - return 1; -} - -__setup("hisax=", HiSax_setup); -#endif /* MODULES */ #if CARD_TELES0 extern int setup_teles0(struct IsdnCard *card); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/hisax/elsa_cs.c tmp2/drivers/isdn/hisax/elsa_cs.c --- tmp/drivers/isdn/hisax/elsa_cs.c Mon Oct 1 05:26:05 2001 +++ tmp2/drivers/isdn/hisax/elsa_cs.c Thu Nov 22 18:55:24 2001 @@ -69,7 +69,7 @@ #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); +PARAM(pc_debug, int, 000); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args); static char *version = "elsa_cs.c $Revision: 1.1.2.2 $ $Date: 2001/09/23 22:24:47 $ (K.Lichtenwalder)"; @@ -88,11 +88,11 @@ /* Newer, simpler way of listing specific interrupts */ static int irq_list[4] = { -1 }; -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); +PARAM(irq_mask, int, 000); +PARAM_ARRAY(irq_list, irq_list, int, 1, 4, 000); static int protocol = 2; /* EURO-ISDN Default */ -MODULE_PARM(protocol, "i"); +PARAM(protocol, int, 000); extern int elsa_init_pcmcia(int, int, int*, int); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/hisax/sedlbauer_cs.c tmp2/drivers/isdn/hisax/sedlbauer_cs.c --- tmp/drivers/isdn/hisax/sedlbauer_cs.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/isdn/hisax/sedlbauer_cs.c Thu Nov 22 18:55:24 2001 @@ -69,7 +69,7 @@ #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); +PARAM(pc_debug, int, 000); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args); static char *version = "sedlbauer_cs.c 1.1a 2001/01/28 15:04:04 (M.Niemann)"; @@ -88,11 +88,11 @@ /* Newer, simpler way of listing specific interrupts */ static int irq_list[4] = { -1 }; -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); +PARAM(irq_mask, int, 000); +PARAM_ARRAY(irq_list, irq_list, int, 1, 4, 000); static int protocol = 2; /* EURO-ISDN Default */ -MODULE_PARM(protocol, "i"); +PARAM(protocol, int, 000); extern int sedl_init_pcmcia(int, int, int*, int); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/hisax/st5481_init.c tmp2/drivers/isdn/hisax/st5481_init.c --- tmp/drivers/isdn/hisax/st5481_init.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/isdn/hisax/st5481_init.c Thu Nov 22 18:55:24 2001 @@ -38,14 +38,14 @@ MODULE_LICENSE("GPL"); static int protocol = 2; /* EURO-ISDN Default */ -MODULE_PARM(protocol, "i"); +PARAM(protocol, int, 000); static int number_of_leds = 2; /* 2 LEDs on the adpater default */ -MODULE_PARM(number_of_leds, "i"); +PARAM(number_of_leds, int, 000); #ifdef CONFIG_HISAX_DEBUG static int debug = 0x1; -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); int st5481_debug; #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/hysdn/hycapi.c tmp2/drivers/isdn/hysdn/hycapi.c --- tmp/drivers/isdn/hysdn/hycapi.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/isdn/hysdn/hycapi.c Thu Nov 22 18:55:24 2001 @@ -32,7 +32,7 @@ static char hycapi_revision[]="$Revision: 1.8.6.4 $"; unsigned int hycapi_enable = 0xffffffff; -MODULE_PARM(hycapi_enable, "i"); +PARAM(hycapi_enable, int, 000); typedef struct _hycapi_appl { unsigned int ctrl_mask; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/hysdn/hysdn_net.c tmp2/drivers/isdn/hysdn/hysdn_net.c --- tmp/drivers/isdn/hysdn/hysdn_net.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/isdn/hysdn/hysdn_net.c Thu Nov 22 18:55:24 2001 @@ -26,7 +26,7 @@ #include "hysdn_defs.h" unsigned int hynet_enable = 0xffffffff; -MODULE_PARM(hynet_enable, "i"); +PARAM(hynet_enable, int, 000); /* store the actual version for log reporting */ char *hysdn_net_revision = "$Revision: 1.8.6.4 $"; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/icn/icn.c tmp2/drivers/isdn/icn/icn.c --- tmp/drivers/isdn/icn/icn.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/isdn/icn/icn.c Thu Nov 22 18:55:24 2001 @@ -21,13 +21,13 @@ MODULE_DESCRIPTION("ISDN4Linux: Driver for ICN active ISDN card"); MODULE_AUTHOR("Fritz Elfert"); MODULE_LICENSE("GPL"); -MODULE_PARM(portbase, "i"); +PARAM(portbase, int, S_IRUGO); MODULE_PARM_DESC(portbase, "Port address of first card"); -MODULE_PARM(membase, "l"); +PARAM(membase, long, S_IRUGO); MODULE_PARM_DESC(membase, "Shared memory address of all cards"); -MODULE_PARM(icn_id, "s"); +PARAM(icn_id, charp, S_IRUGO); MODULE_PARM_DESC(icn_id, "ID-String of first card"); -MODULE_PARM(icn_id2, "s"); +PARAM(icn_id2, charp, S_IRUGO); MODULE_PARM_DESC(icn_id2, "ID-String of first card, second S0 (4B only)"); /* @@ -1633,9 +1633,8 @@ return 0; } -#ifndef MODULE static int __init -icn_setup(char *line) +icn_setup(char *line, struct kernel_param *kp) { char *p, *str; int ints[3]; @@ -1658,8 +1657,7 @@ } return(1); } -__setup("icn=", icn_setup); -#endif /* MODULE */ +PARAM_CALL(icn, icn_setup, NULL); static int __init icn_init(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/isdnloop/isdnloop.c tmp2/drivers/isdn/isdnloop/isdnloop.c --- tmp/drivers/isdn/isdnloop/isdnloop.c Thu Nov 22 18:18:37 2001 +++ tmp2/drivers/isdn/isdnloop/isdnloop.c Thu Nov 22 18:55:25 2001 @@ -20,7 +20,7 @@ MODULE_DESCRIPTION("ISDN4Linux: Pseudo Driver that simulates an ISDN card"); MODULE_AUTHOR("Fritz Elfert"); MODULE_LICENSE("GPL"); -MODULE_PARM(isdnloop_id, "s"); +PARAM(isdnloop_id, charp, S_IRUGO); MODULE_PARM_DESC(isdnloop_id, "ID-String of first card"); static int isdnloop_addcard(char *); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/isdn/pcbit/module.c tmp2/drivers/isdn/pcbit/module.c --- tmp/drivers/isdn/pcbit/module.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/isdn/pcbit/module.c Thu Nov 22 18:55:25 2001 @@ -20,14 +20,14 @@ #include #include "pcbit.h" +static int mem[MAX_PCBIT_CARDS] = {0, }; +static int irq[MAX_PCBIT_CARDS] = {0, }; + MODULE_DESCRIPTION("ISDN4Linux: Driver for PCBIT-T card"); MODULE_AUTHOR("Pedro Roque Marques"); MODULE_LICENSE("GPL"); -MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i"); -MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i"); - -static int mem[MAX_PCBIT_CARDS] = {0, }; -static int irq[MAX_PCBIT_CARDS] = {0, }; +PARAM_ARRAY(mem, mem, int, 1, MAX_PCBIT_CARDS, 000); +PARAM_ARRAY(irq, irq, int, 1, MAX_PCBIT_CARDS, 000); static int num_boards; struct pcbit_dev * dev_pcbit[MAX_PCBIT_CARDS] = {0, }; @@ -90,38 +90,6 @@ printk(KERN_NOTICE "PCBIT-D module unloaded\n"); } - -#ifndef MODULE -#define MAX_PARA (MAX_PCBIT_CARDS * 2) -static int __init pcbit_setup(char *line) -{ - int i, j, argc; - char *str; - int ints[MAX_PARA+1]; - - str = get_options(line, MAX_PARA, ints); - argc = ints[0]; - i = 0; - j = 1; - - while (argc && (i */ #ifdef MODULE static char *parport[MAX_CAMS] = { NULL, }; -MODULE_PARM(parport, "1-" __MODULE_STRING(MAX_CAMS) "s"); +PARAM_ARRAY(parport, parport, charp, 1, MAX_CAMS, S_IRUGO); #endif static void __exit exit_bw_qcams(void) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/c-qcam.c tmp2/drivers/media/video/c-qcam.c --- tmp/drivers/media/video/c-qcam.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/media/video/c-qcam.c Thu Nov 22 18:55:25 2001 @@ -881,10 +881,10 @@ MODULE_PARM_DESC(parport ,"parport= for port detection method\n\ probe=<0|1|2> for camera detection method\n\ force_rgb=<0|1> for RGB data format (default BGR)"); -MODULE_PARM(parport, "1-" __MODULE_STRING(MAX_CAMS) "i"); -MODULE_PARM(probe, "i"); -MODULE_PARM(force_rgb, "i"); -MODULE_PARM(video_nr,"i"); +PARAM_ARRAY(parport, parport, int, 1, MAX_CAMS, 000); +PARAM(probe, int, 000); +PARAM(force_rgb, int, 000); +PARAM(video_nr, int, 000); module_init(cqcam_init); module_exit(cqcam_cleanup); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/cpia.c tmp2/drivers/media/video/cpia.c --- tmp/drivers/media/video/cpia.c Tue Nov 6 11:41:34 2001 +++ tmp2/drivers/media/video/cpia.c Thu Nov 22 18:55:25 2001 @@ -55,7 +55,7 @@ static int video_nr = -1; #ifdef MODULE -MODULE_PARM(video_nr,"i"); +PARAM(video_nr, int, 000); MODULE_AUTHOR("Scott J. Bertin & Peter Pregler & Johannes Erdfelt "); MODULE_DESCRIPTION("V4L-driver for Vision CPiA based cameras"); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/cpia_pp.c tmp2/drivers/media/video/cpia_pp.c --- tmp/drivers/media/video/cpia_pp.c Tue Nov 6 11:41:34 2001 +++ tmp2/drivers/media/video/cpia_pp.c Thu Nov 22 18:55:25 2001 @@ -125,7 +125,7 @@ MODULE_DESCRIPTION("Parallel port driver for Vision CPiA based cameras"); MODULE_LICENSE("GPL"); -MODULE_PARM(parport, "1-" __MODULE_STRING(PARPORT_MAX) "s"); +PARAM_ARRAY(parport, parport, charp, 1, PARPORT_MAX, 000); MODULE_PARM_DESC(parport, "'auto' or a list of parallel port numbers. Just like lp."); #else static int parport_nr[PARPORT_MAX] __initdata = @@ -714,7 +714,7 @@ #else /* !MODULE */ -static int __init cpia_pp_setup(char *str) +static int __init cpia_pp_setup(char *str, struct kernel_param *kp) { #if 0 /* Is this only a 2.2ism? -jerdfelt */ @@ -741,6 +741,6 @@ return 0; } -__setup("cpia_pp=", cpia_pp_setup); +PARAM_CALL(cpia_pp, cpia_pp_setup, NULL); #endif /* !MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/i2c-old.c tmp2/drivers/media/video/i2c-old.c --- tmp/drivers/media/video/i2c-old.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/media/video/i2c-old.c Thu Nov 22 18:55:25 2001 @@ -25,9 +25,9 @@ static int i2c_debug = 0; #if LINUX_VERSION_CODE >= 0x020117 -MODULE_PARM(scan,"i"); -MODULE_PARM(verbose,"i"); -MODULE_PARM(i2c_debug,"i"); +PARAM(scan, int, 000); +PARAM(verbose, int, 000); +PARAM(i2c_debug, int, 000); #endif /* ----------------------------------------------------------------------- */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/i2c-parport.c tmp2/drivers/media/video/i2c-parport.c --- tmp/drivers/media/video/i2c-parport.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/media/video/i2c-parport.c Thu Nov 22 18:55:25 2001 @@ -134,7 +134,7 @@ } #ifdef MODULE -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); void cleanup_module(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/meye.c tmp2/drivers/media/video/meye.c --- tmp/drivers/media/video/meye.c Tue Nov 6 11:41:34 2001 +++ tmp2/drivers/media/video/meye.c Thu Nov 22 18:55:25 2001 @@ -1485,11 +1485,11 @@ EXPORT_NO_SYMBOLS; -MODULE_PARM(gbuffers,"i"); +PARAM(gbuffers, int, 000); MODULE_PARM_DESC(gbuffers,"number of capture buffers, default is 2 (32 max)"); -MODULE_PARM(gbufsize,"i"); +PARAM(gbufsize, int, 000); MODULE_PARM_DESC(gbufsize,"size of the capture buffers, default is 614400"); -MODULE_PARM(video_nr,"i"); +PARAM(video_nr, int, 000); MODULE_PARM_DESC(video_nr,"video device to register (0=/dev/video0, etc)"); /* Module entry points */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/msp3400.c tmp2/drivers/media/video/msp3400.c --- tmp/drivers/media/video/msp3400.c Thu Oct 18 07:19:20 2001 +++ tmp2/drivers/media/video/msp3400.c Thu Nov 22 18:55:25 2001 @@ -125,11 +125,11 @@ #define dprintk if (debug) printk -MODULE_PARM(once,"i"); -MODULE_PARM(debug,"i"); -MODULE_PARM(simple,"i"); -MODULE_PARM(amsound,"i"); -MODULE_PARM(dolby,"i"); +PARAM(once, int, 000); +PARAM(debug, int, 000); +PARAM(simple, int, 000); +PARAM(amsound, int, 000); +PARAM(dolby, int, 000); MODULE_DESCRIPTION("device driver for msp34xx TV sound processor"); MODULE_AUTHOR("Gerd Knorr"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/planb.c tmp2/drivers/media/video/planb.c --- tmp/drivers/media/video/planb.c Tue Nov 6 11:41:34 2001 +++ tmp2/drivers/media/video/planb.c Thu Nov 22 18:55:25 2001 @@ -78,9 +78,9 @@ static int def_norm = PLANB_DEF_NORM; /* default norm */ static int video_nr = -1; -MODULE_PARM(def_norm, "i"); +PARAM(def_norm, int, 000); MODULE_PARM_DESC(def_norm, "Default startup norm (0=PAL, 1=NTSC, 2=SECAM)"); -MODULE_PARM(video_nr,"i"); +PARAM(video_nr, int, 000); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/pms.c tmp2/drivers/media/video/pms.c --- tmp/drivers/media/video/pms.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/media/video/pms.c Thu Nov 22 18:55:25 2001 @@ -1055,9 +1055,9 @@ return video_register_device((struct video_device *)&pms_device, VFL_TYPE_GRABBER, video_nr); } -MODULE_PARM(io_port,"i"); -MODULE_PARM(mem_base,"i"); -MODULE_PARM(video_nr,"i"); +PARAM(io_port, int, 000); +PARAM(mem_base, int, 000); +PARAM(video_nr, int, 000); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/stradis.c tmp2/drivers/media/video/stradis.c --- tmp/drivers/media/video/stradis.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/media/video/stradis.c Thu Nov 22 18:55:25 2001 @@ -64,7 +64,7 @@ static int saa_num = 0; /* number of SAA7146s in use */ static int video_nr = -1; -MODULE_PARM(video_nr,"i"); +PARAM(video_nr, int, 000); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/tda7432.c tmp2/drivers/media/video/tda7432.c --- tmp/drivers/media/video/tda7432.c Thu Oct 18 07:19:20 2001 +++ tmp2/drivers/media/video/tda7432.c Thu Nov 22 18:55:25 2001 @@ -52,8 +52,8 @@ MODULE_DESCRIPTION("bttv driver for the tda7432 audio processor chip"); MODULE_LICENSE("GPL"); -MODULE_PARM(debug,"i"); -MODULE_PARM(loudness,"i"); +PARAM(debug, int, 000); +PARAM(loudness, int, 000); static int loudness = 0; /* disable loudness by default */ static int debug = 0; /* insmod parameter */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/tda9875.c tmp2/drivers/media/video/tda9875.c --- tmp/drivers/media/video/tda9875.c Thu Oct 18 07:19:20 2001 +++ tmp2/drivers/media/video/tda9875.c Thu Nov 22 18:55:25 2001 @@ -33,7 +33,7 @@ #include "audiochip.h" #include "id.h" -MODULE_PARM(debug,"i"); +PARAM(debug, int, 000); MODULE_LICENSE("GPL"); static int debug = 0; /* insmod parameter */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/tuner-3036.c tmp2/drivers/media/video/tuner-3036.c --- tmp/drivers/media/video/tuner-3036.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/media/video/tuner-3036.c Thu Nov 22 18:55:25 2001 @@ -222,7 +222,7 @@ MODULE_AUTHOR("Philip Blundell "); MODULE_LICENSE("GPL"); -MODULE_PARM(debug,"i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug,"Enable debugging output"); module_init(tuner3036_init); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/tuner.c tmp2/drivers/media/video/tuner.c --- tmp/drivers/media/video/tuner.c Thu Oct 18 07:19:20 2001 +++ tmp2/drivers/media/video/tuner.c Thu Nov 22 18:55:25 2001 @@ -37,12 +37,12 @@ static char *pal = "b"; static int tv_range[2] = { 44, 958 }; static int radio_range[2] = { 65, 108 }; -MODULE_PARM(debug,"i"); -MODULE_PARM(type,"i"); -MODULE_PARM(addr,"i"); -MODULE_PARM(tv_range,"2i"); -MODULE_PARM(radio_range,"2i"); -MODULE_PARM(pal,"s"); +PARAM(debug, int, 000); +PARAM(type, int, 000); +PARAM(addr, int, 000); +PARAM_ARRAY(tv_range, tv_range, int, 2, 2, 000); +PARAM_ARRAY(radio_range, radio_range, int, 2, 2, 000); +PARAM(pal, charp, 000); #define optimize_vco 1 diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/tvaudio.c tmp2/drivers/media/video/tvaudio.c --- tmp/drivers/media/video/tvaudio.c Thu Oct 18 07:19:20 2001 +++ tmp2/drivers/media/video/tvaudio.c Thu Nov 22 18:55:25 2001 @@ -37,7 +37,7 @@ /* ---------------------------------------------------------------------- */ /* insmod args */ -MODULE_PARM(debug,"i"); +PARAM(debug, int, 000); static int debug = 0; /* insmod parameter */ #define dprintk if (debug) printk @@ -772,8 +772,8 @@ /* insmod options for tda9874a */ static int tda9874a_SIF = -1; static int tda9874a_STD = -1; -MODULE_PARM(tda9874a_SIF,"i"); -MODULE_PARM(tda9874a_STD,"i"); +PARAM(tda9874a_SIF, int, 000); +PARAM(tda9874a_STD, int, 000); static int tda9874a_setup(struct CHIPSTATE *chip) @@ -967,15 +967,15 @@ int tea6300 = 0; int tea6420 = 1; int pic16c54 = 1; -MODULE_PARM(tda8425,"i"); -MODULE_PARM(tda9840,"i"); -MODULE_PARM(tda9850,"i"); -MODULE_PARM(tda9855,"i"); -MODULE_PARM(tda9873,"i"); -MODULE_PARM(tda9874a,"i"); -MODULE_PARM(tea6300,"i"); -MODULE_PARM(tea6420,"i"); -MODULE_PARM(pic16c54,"i"); +PARAM(tda8425, int, 000); +PARAM(tda9840, int, 000); +PARAM(tda9850, int, 000); +PARAM(tda9855, int, 000); +PARAM(tda9873, int, 000); +PARAM(tda9874a, int, 000); +PARAM(tea6300, int, 000); +PARAM(tea6420, int, 000); +PARAM(pic16c54, int, 000); static struct CHIPDESC chiplist[] = { { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/tvmixer.c tmp2/drivers/media/video/tvmixer.c --- tmp/drivers/media/video/tvmixer.c Thu Oct 18 07:19:20 2001 +++ tmp2/drivers/media/video/tvmixer.c Thu Nov 22 18:55:25 2001 @@ -23,8 +23,8 @@ static int debug = 0; static int devnr = -1; -MODULE_PARM(debug,"i"); -MODULE_PARM(devnr,"i"); +PARAM(debug, int, 000); +PARAM(devnr, int, 000); MODULE_AUTHOR("Gerd Knorr"); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/w9966.c tmp2/drivers/media/video/w9966.c --- tmp/drivers/media/video/w9966.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/media/video/w9966.c Thu Nov 22 18:55:25 2001 @@ -127,18 +127,18 @@ #else static const char* pardev[] = {[0 ... W9966_MAXCAMS] = "aggressive"}; #endif -MODULE_PARM(pardev, "1-" __MODULE_STRING(W9966_MAXCAMS) "s"); +PARAM_ARRAY(pardev, pardev, charp, 1, W9966_MAXCAMS, 000); MODULE_PARM_DESC(pardev, "pardev: where to search for\n\ \teach camera. 'aggressive' means brute-force search.\n\ \tEg: >pardev=parport3,aggressive,parport2,parport1< would assign \tcam 1 to parport3 and search every parport for cam 2 etc..."); static int parmode = 0; -MODULE_PARM(parmode, "i"); +PARAM(parmode, int, 000); MODULE_PARM_DESC(parmode, "parmode: transfer mode (0=auto, 1=ecp, 2=epp"); static int video_nr = -1; -MODULE_PARM(video_nr, "i"); +PARAM(video_nr, int, 000); /* * Private data diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/zr36067.c tmp2/drivers/media/video/zr36067.c --- tmp/drivers/media/video/zr36067.c Thu Nov 22 18:18:37 2001 +++ tmp2/drivers/media/video/zr36067.c Thu Nov 22 18:55:25 2001 @@ -233,17 +233,17 @@ will be some image imperfections */ static int video_nr = -1; -MODULE_PARM(vidmem, "i"); -MODULE_PARM(triton, "i"); -MODULE_PARM(natoma, "i"); -MODULE_PARM(v4l_nbufs, "i"); -MODULE_PARM(v4l_bufsize, "i"); -MODULE_PARM(default_input, "i"); -MODULE_PARM(default_norm, "i"); -MODULE_PARM(lock_norm, "i"); -MODULE_PARM(pass_through, "i"); -MODULE_PARM(lml33dpath, "i"); -MODULE_PARM(video_nr, "i"); +PARAM(vidmem, int, 000); +PARAM(triton, int, 000); +PARAM(natoma, int, 000); +PARAM(v4l_nbufs, int, 000); +PARAM(v4l_bufsize, int, 000); +PARAM(default_input, int, 000); +PARAM(default_norm, int, 000); +PARAM(lock_norm, int, 000); +PARAM(pass_through, int, 000); +PARAM(lml33dpath, int, 000); +PARAM(video_nr, int, 000); static struct pci_device_id zr36067_pci_tbl[] = { { PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36057, diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/media/video/zr36120.c tmp2/drivers/media/video/zr36120.c --- tmp/drivers/media/video/zr36120.c Thu Nov 22 18:18:37 2001 +++ tmp2/drivers/media/video/zr36120.c Thu Nov 22 18:55:25 2001 @@ -71,10 +71,10 @@ MODULE_DESCRIPTION("Zoran ZR36120 based framegrabber"); MODULE_LICENSE("GPL"); -MODULE_PARM(triton1,"i"); -MODULE_PARM(cardtype,"1-" __MODULE_STRING(ZORAN_MAX) "i"); -MODULE_PARM(video_nr,"i"); -MODULE_PARM(vbi_nr,"i"); +PARAM(triton1, int, 000); +PARAM_ARRAY(cardtype, cardtype, int, 1, ZORAN_MAX, 000); +PARAM(video_nr, int, 000); +PARAM(vbi_nr, int, 000); static int zoran_cards; static struct zoran zorans[ZORAN_MAX]; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/message/fusion/mptbase.c tmp2/drivers/message/fusion/mptbase.c --- tmp/drivers/message/fusion/mptbase.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/message/fusion/mptbase.c Thu Nov 22 18:55:25 2001 @@ -114,12 +114,12 @@ /* * cmd line parameters */ -MODULE_PARM(PortIo, "0-1i"); -MODULE_PARM_DESC(PortIo, "[0]=Use mmap, 1=Use port io"); -MODULE_PARM(HardReset, "0-1i"); -MODULE_PARM_DESC(HardReset, "0=Disable HardReset, [1]=Enable HardReset"); static int PortIo = 0; static int HardReset = 1; +PARAM(PortIo, bool, S_IRUGO); +MODULE_PARM_DESC(PortIo, "[0]=Use mmap, 1=Use port io"); +PARAM(HardReset, bool, S_IRUGO); +MODULE_PARM_DESC(HardReset, "0=Disable HardReset, [1]=Enable HardReset"); /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/message/fusion/mptlan.c tmp2/drivers/message/fusion/mptlan.c --- tmp/drivers/message/fusion/mptlan.c Mon Oct 1 05:26:06 2001 +++ tmp2/drivers/message/fusion/mptlan.c Thu Nov 22 18:55:25 2001 @@ -1505,8 +1505,8 @@ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -MODULE_PARM(tx_max_out_p, "i"); -MODULE_PARM(max_buckets_out, "i"); // Debug stuff. FIXME! +PARAM(tx_max_out_p, int, 000); +PARAM(max_buckets_out, int, 000); // Debug stuff. FIXME! MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/message/i2o/i2o_core.c tmp2/drivers/message/i2o/i2o_core.c --- tmp/drivers/message/i2o/i2o_core.c Tue Oct 23 01:39:56 2001 +++ tmp2/drivers/message/i2o/i2o_core.c Thu Nov 22 18:55:25 2001 @@ -222,7 +222,7 @@ */ static int verbose; -MODULE_PARM(verbose, "i"); +PARAM(verbose, bool, S_IWUSR|S_IRUGO); /* * I2O Core reply handler diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/message/i2o/i2o_lan.c tmp2/drivers/message/i2o/i2o_lan.c --- tmp/drivers/message/i2o/i2o_lan.c Tue Oct 23 01:39:56 2001 +++ tmp2/drivers/message/i2o/i2o_lan.c Thu Nov 22 18:55:25 2001 @@ -1567,13 +1567,14 @@ MODULE_LICENSE("GPL"); -MODULE_PARM(max_buckets_out, "1-" __MODULE_STRING(I2O_LAN_MAX_BUCKETS_OUT) "i"); +PARAM_ARRAY(max_buckets_out, max_buckets_out, + int, 1, I2O_LAN_MAX_BUCKETS_OUT, 000); MODULE_PARM_DESC(max_buckets_out, "Total number of buckets to post (1-)"); -MODULE_PARM(bucket_thresh, "1-" __MODULE_STRING(I2O_LAN_MAX_BUCKETS_OUT) "i"); +PARAM(bucket_thresh, int, 000); MODULE_PARM_DESC(bucket_thresh, "Bucket post threshold (1-)"); -MODULE_PARM(rx_copybreak, "1-" "i"); +PARAM(rx_copybreak, int, 000); MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy only small frames (1-)"); -MODULE_PARM(tx_batch_mode, "0-2" "i"); +PARAM(tx_batch_mode, int, 000); MODULE_PARM_DESC(tx_batch_mode, "0=Send immediatelly, 1=Send in batches, 2=Switch automatically"); #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/mtd/devices/blkmtd.c tmp2/drivers/mtd/devices/blkmtd.c --- tmp/drivers/mtd/devices/blkmtd.c Sat Oct 6 05:06:51 2001 +++ tmp2/drivers/mtd/devices/blkmtd.c Thu Nov 22 18:55:25 2001 @@ -125,15 +125,15 @@ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Simon Evans "); MODULE_DESCRIPTION("Emulate an MTD using a block device"); -MODULE_PARM(device, "s"); +PARAM(device, charp, 000); MODULE_PARM_DESC(device, "block device to use"); -MODULE_PARM(erasesz, "i"); +PARAM(erasesz, int, 000); MODULE_PARM_DESC(erasesz, "optional erase size to use in KB. eg 4=4K."); -MODULE_PARM(ro, "i"); +PARAM(ro, bool, 000); MODULE_PARM_DESC(ro, "1=Read only, writes and erases cause errors"); -MODULE_PARM(bs, "i"); +PARAM(bs, int, 000); MODULE_PARM_DESC(bs, "force the block size in bytes"); -MODULE_PARM(count, "i"); +PARAM(count, int, 000); MODULE_PARM_DESC(count, "force the block count"); #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/mtd/devices/doc1000.c tmp2/drivers/mtd/devices/doc1000.c --- tmp/drivers/mtd/devices/doc1000.c Fri Oct 5 08:14:59 2001 +++ tmp2/drivers/mtd/devices/doc1000.c Thu Nov 22 18:55:25 2001 @@ -35,10 +35,10 @@ static int retry_limit = 4; /* write retries */ static u_long max_tries = 4096; /* status polling */ -MODULE_PARM(base,"l"); -MODULE_PARM(erase_timeout, "i"); -MODULE_PARM(retry_limit, "i"); -MODULE_PARM(max_tries, "i"); +PARAM(base, long, 000); +PARAM(erase_timeout, int, 000); +PARAM(retry_limit, int, 000); +PARAM(max_tries, int, 000); #define WINDOW_SIZE 0x2000 #define WINDOW_MASK (WINDOW_SIZE - 1) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/mtd/devices/docprobe.c tmp2/drivers/mtd/devices/docprobe.c --- tmp/drivers/mtd/devices/docprobe.c Fri Oct 5 08:14:59 2001 +++ tmp2/drivers/mtd/devices/docprobe.c Thu Nov 22 18:55:25 2001 @@ -66,7 +66,7 @@ static unsigned long doc_config_location = CONFIG_MTD_DOCPROBE_ADDRESS; -MODULE_PARM(doc_config_location, "l"); +PARAM(doc_config_location, long, 000); static unsigned long __initdata doc_locations[] = { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/mtd/devices/mtdram.c tmp2/drivers/mtd/devices/mtdram.c --- tmp/drivers/mtd/devices/mtdram.c Fri Oct 5 08:14:59 2001 +++ tmp2/drivers/mtd/devices/mtdram.c Thu Nov 22 18:55:25 2001 @@ -27,8 +27,8 @@ #ifdef MODULE static unsigned long total_size = CONFIG_MTDRAM_TOTAL_SIZE; static unsigned long erase_size = CONFIG_MTDRAM_ERASE_SIZE; -MODULE_PARM(total_size,"l"); -MODULE_PARM(erase_size,"l"); +PARAM(total_size, long, 000); +PARAM(erase_size, long, 000); #define MTDRAM_TOTAL_SIZE (total_size * 1024) #define MTDRAM_ERASE_SIZE (erase_size * 1024) #else diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/mtd/devices/pmc551.c tmp2/drivers/mtd/devices/pmc551.c --- tmp/drivers/mtd/devices/pmc551.c Fri Oct 5 08:14:59 2001 +++ tmp2/drivers/mtd/devices/pmc551.c Thu Nov 22 18:55:25 2001 @@ -639,9 +639,9 @@ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Mark Ferrell "); MODULE_DESCRIPTION(PMC551_VERSION); -MODULE_PARM(msize, "i"); -MODULE_PARM_DESC(msize, "memory size in Megabytes [1 - 1024]"); -MODULE_PARM(asize, "i"); +PARAM(msize, int, 000); +MODULE_PARM_DESC(msize, "memory size, 6=32M, 7=64M, 8=128M, etc.. [32M-1024M]"); +PARAM(asize, int, 000); MODULE_PARM_DESC(asize, "aperture size, must be <= memsize [1-1024]"); /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/mtd/devices/slram.c tmp2/drivers/mtd/devices/slram.c --- tmp/drivers/mtd/devices/slram.c Fri Oct 5 08:14:59 2001 +++ tmp2/drivers/mtd/devices/slram.c Thu Nov 22 18:55:25 2001 @@ -46,7 +46,7 @@ static char *map; #endif -MODULE_PARM(map, "3-" __MODULE_STRING(SLRAM_MAX_DEVICES_PARAMS) "s"); +PARAM_ARRAY(map, map, charp, 3, SLRAM_MAX_DEVICES_PARAMS, 000); MODULE_PARM_DESC(map, "List of memory regions to map. \"map=, , \""); static slram_mtd_list_t *slram_mtdlist = NULL; @@ -253,18 +253,6 @@ } return(0); } - -#ifndef MODULE - -static int __init mtd_slram_setup(char *str) -{ - map = str; - return(1); -} - -__setup("slram=", mtd_slram_setup); - -#endif int init_slram(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/mtd/ftl.c tmp2/drivers/mtd/ftl.c --- tmp/drivers/mtd/ftl.c Tue Nov 6 11:41:34 2001 +++ tmp2/drivers/mtd/ftl.c Thu Nov 22 18:55:25 2001 @@ -104,7 +104,7 @@ /* Parameters that can be set with 'insmod' */ static int shuffle_freq = 50; -MODULE_PARM(shuffle_freq, "i"); +PARAM(shuffle_freq, int, 000); /*====================================================================*/ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/mtd/mtdblock_ro.c tmp2/drivers/mtd/mtdblock_ro.c --- tmp/drivers/mtd/mtdblock_ro.c Tue Nov 6 11:41:34 2001 +++ tmp2/drivers/mtd/mtdblock_ro.c Thu Nov 22 18:55:25 2001 @@ -34,7 +34,7 @@ #ifdef MTDBLOCK_DEBUG static int debug = MTDBLOCK_DEBUG; -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/mtd/nand/spia.c tmp2/drivers/mtd/nand/spia.c --- tmp/drivers/mtd/nand/spia.c Fri Oct 5 08:14:59 2001 +++ tmp2/drivers/mtd/nand/spia.c Thu Nov 22 18:55:25 2001 @@ -52,15 +52,10 @@ static int spia_pedr = SPIA_PEDR; static int spia_peddr = SPIA_PEDDR; -MODULE_PARM(spia_io_base, "i"); -MODULE_PARM(spia_fio_base, "i"); -MODULE_PARM(spia_pedr, "i"); -MODULE_PARM(spia_peddr, "i"); - -__setup("spia_io_base=",spia_io_base); -__setup("spia_fio_base=",spia_fio_base); -__setup("spia_pedr=",spia_pedr); -__setup("spia_peddr=",spia_peddr); +PARAM(spia_io_base, int, 000); +PARAM(spia_fio_base, int, 000); +PARAM(spia_pedr, int, 000); +PARAM(spia_peddr, int, 000); /* * Define partitions for flash device diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/parport/parport_cs.c tmp2/drivers/parport/parport_cs.c --- tmp/drivers/parport/parport_cs.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/parport/parport_cs.c Thu Nov 22 18:55:25 2001 @@ -59,7 +59,7 @@ #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); +PARAM(pc_debug, int, 000); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) static char *version = "parport_cs.c 1.20 2000/11/02 23:15:05 (David Hinds)"; @@ -80,9 +80,9 @@ static int irq_list[4] = { -1 }; static int epp_mode = 1; -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); -MODULE_PARM(epp_mode, "i"); +PARAM(irq_mask, int, 000); +PARAM_ARRAY(irq_list, irq_list, int, 1, 4, 000); +PARAM(epp_mode, int, 000); /*====================================================================*/ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/parport/parport_pc.c tmp2/drivers/parport/parport_pc.c --- tmp/drivers/parport/parport_pc.c Thu Nov 22 18:18:42 2001 +++ tmp2/drivers/parport/parport_pc.c Thu Nov 22 18:55:25 2001 @@ -3009,22 +3009,22 @@ { [0 ... PARPORT_PC_MAX_PORTS] = PARPORT_IOHI_AUTO }; static int dmaval[PARPORT_PC_MAX_PORTS] = { [0 ... PARPORT_PC_MAX_PORTS-1] = PARPORT_DMA_AUTO }; static int irqval[PARPORT_PC_MAX_PORTS] = { [0 ... PARPORT_PC_MAX_PORTS-1] = PARPORT_IRQ_PROBEONLY }; -static const char *irq[PARPORT_PC_MAX_PORTS] = { NULL, }; -static const char *dma[PARPORT_PC_MAX_PORTS] = { NULL, }; +static char *irq[PARPORT_PC_MAX_PORTS] = { NULL, }; +static char *dma[PARPORT_PC_MAX_PORTS] = { NULL, }; MODULE_AUTHOR("Phil Blundell, Tim Waugh, others"); MODULE_DESCRIPTION("PC-style parallel port driver"); MODULE_LICENSE("GPL"); MODULE_PARM_DESC(io, "Base I/O address (SPP regs)"); -MODULE_PARM(io, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "i"); +PARAM_ARRAY(io, io, int, 1, PARPORT_PC_MAX_PORTS, 000); MODULE_PARM_DESC(io_hi, "Base I/O address (ECR)"); -MODULE_PARM(io_hi, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "i"); +PARAM_ARRAY(io_hi, io_hi, int, 1, PARPORT_PC_MAX_PORTS, 000); MODULE_PARM_DESC(irq, "IRQ line"); -MODULE_PARM(irq, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "s"); +PARAM_ARRAY(irq, irq, charp, 1, PARPORT_PC_MAX_PORTS, 000); MODULE_PARM_DESC(dma, "DMA channel"); -MODULE_PARM(dma, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "s"); -MODULE_PARM(verbose_probing, "i"); +PARAM_ARRAY(dma, dma, charp, 1, PARPORT_PC_MAX_PORTS, 000); +PARAM(verbose_probing, int, 000); MODULE_PARM_DESC(verbose_probing, "Log chit-chat during initialisation"); int init_module(void) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/pci/pci.c tmp2/drivers/pci/pci.c --- tmp/drivers/pci/pci.c Thu Nov 22 18:18:42 2001 +++ tmp2/drivers/pci/pci.c Thu Nov 22 18:58:35 2001 @@ -1944,7 +1944,7 @@ #endif } -static int __devinit pci_setup(char *str) +static int __devinit pci_setup(char *str, struct kernel_param *kp) { while (str) { char *k = strchr(str, ','); @@ -1956,10 +1956,10 @@ } str = k; } - return 1; + return 0; } -__setup("pci=", pci_setup); +PARAM_CALL(pci, pci_setup, NULL); EXPORT_SYMBOL(pci_read_config_byte); EXPORT_SYMBOL(pci_read_config_word); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/pcmcia/cistpl.c tmp2/drivers/pcmcia/cistpl.c --- tmp/drivers/pcmcia/cistpl.c Thu Nov 22 18:18:43 2001 +++ tmp2/drivers/pcmcia/cistpl.c Thu Nov 22 18:55:25 2001 @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -79,9 +80,9 @@ /*====================================================================*/ -/* Parameters that can be set with 'insmod' */ +/* Parameters */ -#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i") +#define INT_MODULE_PARM(n, v) static int n = v; PARAM(n, int, 000) INT_MODULE_PARM(cis_width, 0); /* 16-bit CIS? */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/pcmcia/cs.c tmp2/drivers/pcmcia/cs.c --- tmp/drivers/pcmcia/cs.c Thu Nov 22 18:18:43 2001 +++ tmp2/drivers/pcmcia/cs.c Thu Nov 22 18:56:40 2001 @@ -94,7 +94,7 @@ "\n options:" OPTIONS); MODULE_LICENSE("Dual MPL/GPL"); -#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i") +#define INT_MODULE_PARM(n, v) static int n = v; PARAM(n, int, 000) INT_MODULE_PARM(setup_delay, 10); /* centiseconds */ INT_MODULE_PARM(resume_delay, 20); /* centiseconds */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/pcmcia/i82365.c tmp2/drivers/pcmcia/i82365.c --- tmp/drivers/pcmcia/i82365.c Thu Nov 22 18:18:43 2001 +++ tmp2/drivers/pcmcia/i82365.c Thu Nov 22 18:55:25 2001 @@ -68,7 +68,7 @@ #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); +PARAM(pc_debug, int, 000); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) static const char *version = "i82365.c 1.265 1999/11/10 18:36:21 (David Hinds)"; @@ -128,28 +128,28 @@ #endif #ifdef CONFIG_ISA -MODULE_PARM(i365_base, "i"); -MODULE_PARM(ignore, "i"); -MODULE_PARM(extra_sockets, "i"); -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-16i"); -MODULE_PARM(cs_irq, "i"); -MODULE_PARM(async_clock, "i"); -MODULE_PARM(cable_mode, "i"); -MODULE_PARM(wakeup, "i"); +PARAM(i365_base, int, 000); +PARAM(ignore, int, 000); +PARAM(extra_sockets, int, 000); +PARAM(irq_mask, int, 000); +PARAM(irq_list, "1-16i"); +PARAM(cs_irq, int, 000); +PARAM(async_clock, int, 000); +PARAM(cable_mode, int, 000); +PARAM(wakeup, int, 000); #endif -MODULE_PARM(do_scan, "i"); -MODULE_PARM(poll_interval, "i"); -MODULE_PARM(cycle_time, "i"); -MODULE_PARM(has_dma, "i"); -MODULE_PARM(has_led, "i"); -MODULE_PARM(has_ring, "i"); -MODULE_PARM(dynamic_mode, "i"); -MODULE_PARM(freq_bypass, "i"); -MODULE_PARM(setup_time, "i"); -MODULE_PARM(cmd_time, "i"); -MODULE_PARM(recov_time, "i"); +PARAM(do_scan, int, 000); +PARAM(poll_interval, int, 000); +PARAM(cycle_time, int, 000); +PARAM(has_dma, int, 000); +PARAM(has_led, int, 000); +PARAM(has_ring, int, 000); +PARAM(dynamic_mode, int, 000); +PARAM(freq_bypass, int, 000); +PARAM(setup_time, int, 000); +PARAM(cmd_time, int, 000); +PARAM(recov_time, int, 000); /*====================================================================*/ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/pcmcia/rsrc_mgr.c tmp2/drivers/pcmcia/rsrc_mgr.c --- tmp/drivers/pcmcia/rsrc_mgr.c Thu Nov 22 18:18:43 2001 +++ tmp2/drivers/pcmcia/rsrc_mgr.c Thu Nov 22 18:55:25 2001 @@ -56,9 +56,9 @@ /*====================================================================*/ -/* Parameters that can be set with 'insmod' */ +/* Parameters */ -#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i") +#define INT_MODULE_PARM(n, v) static int n = v; PARAM(n, int, 000) INT_MODULE_PARM(probe_mem, 1); /* memory probe? */ #ifdef CONFIG_ISA diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/pcmcia/tcic.c tmp2/drivers/pcmcia/tcic.c --- tmp/drivers/pcmcia/tcic.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/pcmcia/tcic.c Thu Nov 22 18:55:25 2001 @@ -59,7 +59,7 @@ #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); +PARAM(pc_debug, int, 000); static const char *version = "tcic.c 1.111 2000/02/15 04:13:12 (David Hinds)"; #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) @@ -100,15 +100,15 @@ /* CCLK external clock time, in nanoseconds. 70 ns = 14.31818 MHz */ static int cycle_time = 70; -MODULE_PARM(tcic_base, "i"); -MODULE_PARM(ignore, "i"); -MODULE_PARM(do_scan, "i"); -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-16i"); -MODULE_PARM(cs_irq, "i"); -MODULE_PARM(poll_interval, "i"); -MODULE_PARM(poll_quick, "i"); -MODULE_PARM(cycle_time, "i"); +PARAM(tcic_base, int, 000); +PARAM(ignore, int, 000); +PARAM(do_scan, int, 000); +PARAM(irq_mask, int, 000); +PARAM_ARRAY(irq_list, irq_list, int, 1, 16, 000); +PARAM(cs_irq, int, 000); +PARAM(poll_interval, int, 000); +PARAM(poll_quick, int, 000); +PARAM(cycle_time, int, 000); /*====================================================================*/ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/pnp/isapnp.c tmp2/drivers/pnp/isapnp.c --- tmp/drivers/pnp/isapnp.c Thu Nov 22 18:18:43 2001 +++ tmp2/drivers/pnp/isapnp.c Thu Nov 22 18:55:25 2001 @@ -72,23 +72,23 @@ MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Generic ISA Plug & Play support"); -MODULE_PARM(isapnp_disable, "i"); +PARAM(isapnp_disable, int, 000); MODULE_PARM_DESC(isapnp_disable, "ISA Plug & Play disable"); -MODULE_PARM(isapnp_rdp, "i"); +PARAM(isapnp_rdp, int, 000); MODULE_PARM_DESC(isapnp_rdp, "ISA Plug & Play read data port"); -MODULE_PARM(isapnp_reset, "i"); +PARAM(isapnp_reset, int, 000); MODULE_PARM_DESC(isapnp_reset, "ISA Plug & Play reset all cards"); -MODULE_PARM(isapnp_skip_pci_scan, "i"); +PARAM(isapnp_skip_pci_scan, int, 000); MODULE_PARM_DESC(isapnp_skip_pci_scan, "ISA Plug & Play skip PCI resource scanning"); -MODULE_PARM(isapnp_verbose, "i"); +PARAM(isapnp_verbose, int, 000); MODULE_PARM_DESC(isapnp_verbose, "ISA Plug & Play verbose mode"); -MODULE_PARM(isapnp_reserve_irq, "1-16i"); +PARAM_ARRAY(isapnp_reserve_irq, isapnp_reserve_irq, int, 1, 16, 000); MODULE_PARM_DESC(isapnp_reserve_irq, "ISA Plug & Play - reserve IRQ line(s)"); -MODULE_PARM(isapnp_reserve_dma, "1-8i"); +PARAM_ARRAY(isapnp_reserve_dma, isapnp_reserve_dma, int, 1, 8, 000); MODULE_PARM_DESC(isapnp_reserve_dma, "ISA Plug & Play - reserve DMA channel(s)"); -MODULE_PARM(isapnp_reserve_io, "1-16i"); +PARAM_ARRAY(isapnp_reserve_io, isapnp_reserve_io, int, 1, 16, 000); MODULE_PARM_DESC(isapnp_reserve_io, "ISA Plug & Play - reserve I/O region(s) - port,size"); -MODULE_PARM(isapnp_reserve_mem, "1-16i"); +PARAM_ARRAY(isapnp_reserve_mem, isapnp_reserve_mem, int, 1, 16, 000); MODULE_PARM_DESC(isapnp_reserve_mem, "ISA Plug & Play - reserve memory region(s) - address,size"); MODULE_LICENSE("GPL"); @@ -2368,86 +2368,4 @@ if (isapnp_detected) isapnp_free_all_resources(); } - -#else - -/* format is: noisapnp */ - -static int __init isapnp_setup_disable(char *str) -{ - isapnp_disable = 1; - return 1; -} - -__setup("noisapnp", isapnp_setup_disable); - -/* format is: isapnp=rdp,reset,skip_pci_scan,verbose */ - -static int __init isapnp_setup_isapnp(char *str) -{ - (void)((get_option(&str,&isapnp_rdp) == 2) && - (get_option(&str,&isapnp_reset) == 2) && - (get_option(&str,&isapnp_skip_pci_scan) == 2) && - (get_option(&str,&isapnp_verbose) == 2)); - return 1; -} - -__setup("isapnp=", isapnp_setup_isapnp); - -/* format is: isapnp_reserve_irq=irq1[,irq2] .... */ - -static int __init isapnp_setup_reserve_irq(char *str) -{ - int i; - - for (i = 0; i < 16; i++) - if (get_option(&str,&isapnp_reserve_irq[i]) != 2) - break; - return 1; -} - -__setup("isapnp_reserve_irq=", isapnp_setup_reserve_irq); - -/* format is: isapnp_reserve_dma=dma1[,dma2] .... */ - -static int __init isapnp_setup_reserve_dma(char *str) -{ - int i; - - for (i = 0; i < 8; i++) - if (get_option(&str,&isapnp_reserve_dma[i]) != 2) - break; - return 1; -} - -__setup("isapnp_reserve_dma=", isapnp_setup_reserve_dma); - -/* format is: isapnp_reserve_io=io1,size1[,io2,size2] .... */ - -static int __init isapnp_setup_reserve_io(char *str) -{ - int i; - - for (i = 0; i < 16; i++) - if (get_option(&str,&isapnp_reserve_io[i]) != 2) - break; - return 1; -} - -__setup("isapnp_reserve_io=", isapnp_setup_reserve_io); - -/* format is: isapnp_reserve_mem=mem1,size1[,mem2,size2] .... */ - -static int __init isapnp_setup_reserve_mem(char *str) -{ - int i; - - for (i = 0; i < 16; i++) - if (get_option(&str,&isapnp_reserve_mem[i]) != 2) - break; - return 1; -} - -__setup("isapnp_reserve_mem=", isapnp_setup_reserve_mem); - #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/s390/block/dasd.c tmp2/drivers/s390/block/dasd.c --- tmp/drivers/s390/block/dasd.c Thu Nov 22 18:18:43 2001 +++ tmp2/drivers/s390/block/dasd.c Thu Nov 22 18:55:25 2001 @@ -92,8 +92,8 @@ MODULE_DESCRIPTION ("Linux on S/390 DASD device driver," " Copyright 2000 IBM Corporation"); MODULE_SUPPORTED_DEVICE ("dasd"); -MODULE_PARM (dasd, "1-" __MODULE_STRING (256) "s"); -MODULE_PARM (dasd_disciplines, "1-" __MODULE_STRING (8) "s"); +PARAM_ARRAY(dasd, dasd, charp, 1, 256, 000); +PARAM_ARRAY(dasd_disciplines, dasd_disciplines, charp, 1, 8, 000); EXPORT_SYMBOL (dasd_chanq_enq_head); EXPORT_SYMBOL (dasd_debug_area); EXPORT_SYMBOL (dasd_chanq_enq); @@ -468,21 +468,21 @@ * is invoked for any single 'dasd=' parameter supplied in the parmline */ int __init -dasd_call_setup (char *str) +dasd_call_setup (char *str, struct kernel_param *kp) { int dummy; dasd_setup (str, &dummy); - return 1; + return 0; } int __init -dasd_disciplines_setup (char *str) +dasd_disciplines_setup (char *str, struct kernel_param *kp) { - return 1; + return 0; } -__setup ("dasd=", dasd_call_setup); -__setup ("dasd_disciplines=", dasd_disciplines_setup); +PARAM_CALL(dasd, dasd_call_setup, NULL); +PARAM_CALL(dasd_disciplines, dasd_disciplines_setup, NULL); #endif /* MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/s390/block/xpram.c tmp2/drivers/s390/block/xpram.c --- tmp/drivers/s390/block/xpram.c Tue Nov 6 11:41:36 2001 +++ tmp2/drivers/s390/block/xpram.c Thu Nov 22 18:55:25 2001 @@ -104,7 +104,7 @@ #include "xpram.h" /* local definitions */ -__setup("xpram_parts=", xpram_setup); +PARAM_CALL(xpram_parts, xpram_setup, NULL); #endif /* V24 */ /* @@ -174,8 +174,8 @@ unsigned long xpram_sizes[XPRAM_MAX_DEVS]; -MODULE_PARM(devs,"i"); -MODULE_PARM(sizes,"1-" __MODULE_STRING(XPRAM_MAX_DEVS) "i"); +PARAM(devs, int, 000); +PARAM_ARRAY(sizes, sizes, int, 1, XPRAM_MAX_DEVS, 000); MODULE_PARM_DESC(devs, "number of devices (\"partitions\"), " \ "the default is " __MODULE_STRING(XPRAM_DEVS) "\n"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/s390/char/hwc_cpi.c tmp2/drivers/s390/char/hwc_cpi.c --- tmp/drivers/s390/char/hwc_cpi.c Fri Oct 12 02:43:29 2001 +++ tmp2/drivers/s390/char/hwc_cpi.c Thu Nov 22 18:55:25 2001 @@ -62,12 +62,12 @@ "identify this operating system instance to the S/390 or zSeries hardware"); static char *system_name = NULL; -MODULE_PARM (system_name, "s"); +PARAM(system_name, charp, 000); MODULE_PARM_DESC (system_name, "e.g. hostname - max. 8 characters"); static char *sysplex_name = NULL; #ifdef ALLOW_SYSPLEX_NAME -MODULE_PARM (sysplex_name, "s"); +PARAM(sysplex_name, charp, 000); MODULE_PARM_DESC (sysplex_name, "if applicable - max. 8 characters"); #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/s390/char/tape.c tmp2/drivers/s390/char/tape.c --- tmp/drivers/s390/char/tape.c Thu Jul 26 07:12:02 2001 +++ tmp2/drivers/s390/char/tape.c Thu Nov 22 18:55:25 2001 @@ -221,61 +221,6 @@ /* SECTION: Parameters for tape */ char *tape[256] = { NULL, }; -#ifndef MODULE -static char tape_parm_string[1024] __initdata = { 0, }; -static void -tape_split_parm_string (char *str) -{ - char *tmp = str; - int count = 0; - while (tmp != NULL && *tmp != '\0') { - char *end; - int len; - end = strchr (tmp, ','); - if (end == NULL) { - len = strlen (tmp) + 1; - } else { - len = (long) end - (long) tmp + 1; - *end = '\0'; - end++; - } - tape[count] = kmalloc (len * sizeof (char), GFP_ATOMIC); - if (tape[count] == NULL) { - printk (KERN_WARNING PRINTK_HEADER - "can't store tape= parameter no %d\n", - count + 1); - break; - } - memset (tape[count], 0, len * sizeof (char)); - memcpy (tape[count], tmp, len * sizeof (char)); - count++; - tmp = end; - }; -} - -void __init -tape_parm_setup (char *str, int *ints) -{ - int len = strlen (tape_parm_string); - if (len != 0) { - strcat (tape_parm_string, ","); - } - strcat (tape_parm_string, str); -} - -int __init -tape_parm_call_setup (char *str) -{ - int dummy; - tape_parm_setup (str, &dummy); - return 1; -} - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,2,16)) -__setup("tape=", tape_parm_call_setup); -#endif /* kernel <2.2.19 */ -#endif /* not defined MODULE */ - static inline int tape_parm_strtoul (char *str, char **stra) { @@ -941,7 +886,7 @@ #ifdef MODULE MODULE_AUTHOR("(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte (cotte@de.ibm.com)"); MODULE_DESCRIPTION("Linux for S/390 channel attached tape device driver"); -MODULE_PARM (tape, "1-" __MODULE_STRING (256) "s"); +PARAM_ARRAY(tape, tape, charp, 1, 256, 000); int init_module (void) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/s390/char/tuball.c tmp2/drivers/s390/char/tuball.c --- tmp/drivers/s390/char/tuball.c Fri Oct 12 02:43:29 2001 +++ tmp2/drivers/s390/char/tuball.c Thu Nov 22 18:55:25 2001 @@ -26,9 +26,9 @@ int tubscrolltime = -1; int tubxcorrect = 1; /* Do correct ebc<->asc tables */ #ifdef MODULE -MODULE_PARM(tubdebug, "i"); -MODULE_PARM(tubscrolltime, "i"); -MODULE_PARM(tubxcorrect, "i"); +PARAM(tubdebug, int, 000); +PARAM(tubscrolltime, int, 000); +PARAM(tubxcorrect, int, 000); #endif /* * Values for tubdebug and their effects: diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/s390/s390io.c tmp2/drivers/s390/s390io.c --- tmp/drivers/s390/s390io.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/s390/s390io.c Thu Nov 22 18:55:25 2001 @@ -379,7 +379,7 @@ strcat (blacklist_parm_string, str); } -int __init blacklist_call_setup (char *str) +int __init blacklist_call_setup (char *str, struct kernel_param *kp) { int dummy; #ifdef CONFIG_DEBUG_IO @@ -392,10 +392,10 @@ blacklist_init(); /* Blacklist ranges must be ready when device recognition starts */ - return 1; + return 0; } -__setup ("cio_ignore=", blacklist_call_setup); +PARAM_CALL(cio_ignore, blacklist_call_setup, NULL); /* Checking if devices are blacklisted */ @@ -630,56 +630,9 @@ debug_sprintf_event(cio_debug_msg_id, level, "%s\n",buffer); } -static int __init cio_setup( char *parm ) -{ - if ( !strcmp( parm, "yes") ) - { - cio_show_msg = 1; - } - else if ( !strcmp( parm, "no") ) - { - cio_show_msg = 0; - } - else - { - printk( "cio_setup : invalid cio_msg parameter '%s'", parm); - - } /* endif */ - - return 1; -} - -__setup("cio_msg=", cio_setup); - -static int __init cio_notoper_setup(char *parm) -{ - if (!strcmp(parm, "yes")) { - cio_notoper_msg = 1; - } else if (!strcmp(parm, "no")) { - cio_notoper_msg = 0; - } else { - printk("cio_notoper_setup: invalid cio_notoper_msg parameter '%s'", parm); - } - - return 1; -} - -__setup("cio_notoper_msg=", cio_notoper_setup); - -static int __init cio_proc_devinfo_setup(char *parm) -{ - if (!strcmp(parm, "yes")) { - cio_proc_devinfo = 1; - } else if (!strcmp(parm, "no")) { - cio_proc_devinfo = 0; - } else { - printk("cio_proc_devinfo_setup: invalid parameter '%s'\n",parm); - } - - return 1; -} - -__setup("cio_proc_devinfo=", cio_proc_devinfo_setup); +PARAM_NAMED(cio_msg, cio_show_msg, bool, 000); +PARAM(cio_notoper_msg, bool, 000); +PARAM(cio_proc_devinfo, bool, 000); /* * register for adapter interrupts diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sbus/audio/dbri.c tmp2/drivers/sbus/audio/dbri.c --- tmp/drivers/sbus/audio/dbri.c Thu Oct 11 16:42:46 2001 +++ tmp2/drivers/sbus/audio/dbri.c Thu Nov 22 18:55:25 2001 @@ -80,10 +80,10 @@ #define D_DESC (1<<5) static int dbri_debug = 0; -MODULE_PARM(dbri_debug, "i"); +PARAM(dbri_debug, int, 000); static int dbri_trace = 0; -MODULE_PARM(dbri_trace, "i"); +PARAM(dbri_trace, int, 000); #define tprintk(x) if(dbri_trace) printk x static char *cmds[] = { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sbus/char/aurora.c tmp2/drivers/sbus/char/aurora.c --- tmp/drivers/sbus/char/aurora.c Tue Nov 6 11:41:36 2001 +++ tmp2/drivers/sbus/char/aurora.c Thu Nov 22 18:55:26 2001 @@ -2434,10 +2434,10 @@ int irq1 = 0; int irq2 = 0; int irq3 = 0; -MODULE_PARM(irq , "i"); -MODULE_PARM(irq1, "i"); -MODULE_PARM(irq2, "i"); -MODULE_PARM(irq3, "i"); +PARAM(irq, int, 000); +PARAM(irq1, int, 000); +PARAM(irq2, int, 000); +PARAM(irq3, int, 000); static int __init aurora_init(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sbus/char/cpwatchdog.c tmp2/drivers/sbus/char/cpwatchdog.c --- tmp/drivers/sbus/char/cpwatchdog.c Thu Oct 11 16:42:47 2001 +++ tmp2/drivers/sbus/char/cpwatchdog.c Thu Nov 22 18:55:26 2001 @@ -179,14 +179,11 @@ static int wd1_timeout = 0; static int wd2_timeout = 0; -#ifdef MODULE -EXPORT_NO_SYMBOLS; - -MODULE_PARM (wd0_timeout, "i"); +PARAM(wd0_timeout, int, 000); MODULE_PARM_DESC(wd0_timeout, "Default watchdog0 timeout in 1/10secs"); -MODULE_PARM (wd1_timeout, "i"); +PARAM(wd1_timeout, int, 000); MODULE_PARM_DESC(wd1_timeout, "Default watchdog1 timeout in 1/10secs"); -MODULE_PARM (wd2_timeout, "i"); +PARAM(wd2_timeout, int, 000); MODULE_PARM_DESC(wd2_timeout, "Default watchdog2 timeout in 1/10secs"); MODULE_AUTHOR @@ -196,7 +193,6 @@ MODULE_LICENSE("GPL"); MODULE_SUPPORTED_DEVICE ("watchdog"); -#endif /* ifdef MODULE */ /* Forward declarations of internal methods */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sbus/char/riowatchdog.c tmp2/drivers/sbus/char/riowatchdog.c --- tmp/drivers/sbus/char/riowatchdog.c Thu Oct 11 16:42:47 2001 +++ tmp2/drivers/sbus/char/riowatchdog.c Thu Nov 22 18:55:26 2001 @@ -59,7 +59,7 @@ #define WDTO_INDEX 0x05 static int riowd_timeout = 1; /* in minutes */ -MODULE_PARM(riowd_timeout,"i"); +PARAM(riowd_timeout, int, 000); MODULE_PARM_DESC(riowd_timeout, "Watchdog timeout in minutes"); #if 0 /* Currently unused. */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/AM53C974.c tmp2/drivers/scsi/AM53C974.c --- tmp/drivers/scsi/AM53C974.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/scsi/AM53C974.c Thu Nov 22 18:55:26 2001 @@ -570,20 +570,19 @@ restore_flags(flags); } -#ifndef MODULE /************************************************************************** -* Function : AM53C974_setup(char *str) +* Function : AM53C974_setup(char *str, struct kernel_param *kp) * -* Purpose : LILO command line initialization of the overrides array, +* Purpose : boot and insmod command line initialization of the overrides array, * * Input : str - parameter string. * -* Returns : 1. +* Returns : 0. * * NOTE : this function needs to be declared as an external function * in init/main.c and included there in the bootsetups list ***************************************************************************/ -static int AM53C974_setup(char *str) +static int AM53C974_setup(char *str, struct kernel_param *kp) { int ints[5]; @@ -610,11 +609,9 @@ printk("AM53C974_setup: too many overrides\n"); } - return 1; + return 0; } -__setup("AM53C974=", AM53C974_setup); - -#endif /* !MODULE */ +PARAM_CALL(overrides, AM53C974_setup, NULL); /************************************************************************** * Function : int AM53C974_pci_detect(Scsi_Host_Template *tpnt) @@ -2444,11 +2441,6 @@ scsi_unregister(shp); return 0; } - - -/* You can specify overrides=a,b,c,d in the same format at AM53C974=a,b,c,d - on boot up */ -MODULE_PARM(overrides, "1-32i"); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/BusLogic.c tmp2/drivers/scsi/BusLogic.c --- tmp/drivers/scsi/BusLogic.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/scsi/BusLogic.c Thu Nov 22 18:55:26 2001 @@ -80,7 +80,7 @@ #ifdef MODULE static char *BusLogic; -MODULE_PARM(BusLogic, "s"); +PARAM(BusLogic, charp, 000); #endif @@ -4972,7 +4972,7 @@ */ static int __init -BusLogic_Setup(char *str) +BusLogic_Setup(char *str, struct kernel_param *kp) { int ints[3]; @@ -4988,7 +4988,7 @@ return BusLogic_ParseDriverOptions(str); } -__setup("BusLogic=", BusLogic_Setup); +PARAM_CALL(BusLogic, BusLogic_Setup, NULL); /* Get it all started diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/BusLogic.h tmp2/drivers/scsi/BusLogic.h --- tmp/drivers/scsi/BusLogic.h Fri Jul 20 14:07:57 2001 +++ tmp2/drivers/scsi/BusLogic.h Thu Nov 22 18:55:26 2001 @@ -1803,7 +1803,7 @@ int BusLogic_ReleaseHostAdapter(SCSI_Host_T *) __init; static boolean BusLogic_ParseKeyword(char **, char *) __init; static int BusLogic_ParseDriverOptions(char *) __init; -static int BusLogic_Setup(char *) __init; +static int BusLogic_Setup(char *, struct kernel_param *) __init; #endif /* BusLogic_DriverVersion */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/NCR_D700.c tmp2/drivers/scsi/NCR_D700.c --- tmp/drivers/scsi/NCR_D700.c Mon Sep 10 04:58:36 2001 +++ tmp2/drivers/scsi/NCR_D700.c Thu Nov 22 18:55:26 2001 @@ -131,7 +131,7 @@ MODULE_AUTHOR("James Bottomley"); MODULE_DESCRIPTION("NCR Dual700 SCSI Driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(NCR_D700, "s"); +PARAM(NCR_D700, charp, 000); static __u8 __initdata id_array[2*(MCA_MAX_SLOT_NR + 1)] = { [0 ... 2*(MCA_MAX_SLOT_NR + 1)-1] = 7 }; @@ -174,10 +174,6 @@ } return 1; } - -#ifndef MODULE -__setup("NCR_D700=", param_setup); -#endif /* Detect a D700 card. Note, because of the set up---the chips are * essentially connectecd to the MCA bus independently, it is easier diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/aha152x.c tmp2/drivers/scsi/aha152x.c --- tmp/drivers/scsi/aha152x.c Thu Nov 22 18:18:44 2001 +++ tmp2/drivers/scsi/aha152x.c Thu Nov 22 18:55:26 2001 @@ -335,56 +335,56 @@ MODULE_DESCRIPTION(AHA152X_REVID); MODULE_LICENSE("GPL"); -MODULE_PARM(io, "1-2i"); +PARAM_ARRAY(io, io, int, 1, 2, 000); MODULE_PARM_DESC(io,"base io address of controller"); static int io[] = {0, 0}; -MODULE_PARM(irq, "1-2i"); +PARAM_ARRAY(irq, irq, int, 1, 2, 000); MODULE_PARM_DESC(irq,"interrupt for controller"); static int irq[] = {0, 0}; -MODULE_PARM(scsiid, "1-2i"); +PARAM_ARRAY(scsiid, scsiid, int, 1, 2, 000); MODULE_PARM_DESC(scsiid,"scsi id of controller"); static int scsiid[] = {7, 7}; -MODULE_PARM(reconnect, "1-2i"); +PARAM_ARRAY(reconnect, reconnect, int, 1, 2, 000); MODULE_PARM_DESC(reconnect,"allow targets to disconnect"); static int reconnect[] = {1, 1}; -MODULE_PARM(parity, "1-2i"); +PARAM_ARRAY(parity, parity, int, 1, 2, 000); MODULE_PARM_DESC(parity,"use scsi parity"); static int parity[] = {1, 1}; -MODULE_PARM(sync, "1-2i"); +PARAM_ARRAY(sync, sync, int, 1, 2, 000); MODULE_PARM_DESC(sync,"use synchronous transfers"); static int sync[] = {1, 1}; -MODULE_PARM(delay, "1-2i"); +PARAM_ARRAY(delay, delay, int, 1, 2, 000); MODULE_PARM_DESC(delay,"scsi reset delay"); static int delay[] = {DELAY_DEFAULT, DELAY_DEFAULT}; -MODULE_PARM(exttrans, "1-2i"); +PARAM_ARRAY(exttrans, exttrans, int, 1, 2, 000); MODULE_PARM_DESC(exttrans,"use extended translation"); static int exttrans[] = {0, 0}; #if !defined(AHA152X_DEBUG) -MODULE_PARM(aha152x, "1-8i"); +PARAM_ARRAY(aha152x, aha152x, int, 1, 8, 000); MODULE_PARM_DESC(aha152x, "parameters for first controller"); static int aha152x[] = {0, 11, 7, 1, 1, 0, DELAY_DEFAULT, 0}; -MODULE_PARM(aha152x1, "1-8i"); +PARAM_ARRAY(aha152x1, aha152x1, int, 1, 8, 000); MODULE_PARM_DESC(aha152x1, "parameters for second controller"); static int aha152x1[] = {0, 11, 7, 1, 1, 0, DELAY_DEFAULT, 0}; #else -MODULE_PARM(debug, "1-2i"); +PARAM_ARRAY(debug, debug, int, 1, 2, 000); MODULE_PARM_DESC(debug, "flags for driver debugging"); static int debug[] = {DEBUG_DEFAULT, DEBUG_DEFAULT}; -MODULE_PARM(aha152x, "1-9i"); +PARAM_ARRAY(aha152x, aha152x, int, 1, 9, 000); MODULE_PARM_DESC(aha152x, "parameters for first controller"); static int aha152x[] = {0, 11, 7, 1, 1, 1, DELAY_DEFAULT, 0, DEBUG_DEFAULT}; -MODULE_PARM(aha152x1, "1-9i"); +PARAM_ARRAY(aha152x1, aha152x1, int, 1, 9, 000); MODULE_PARM_DESC(aha152x1, "parameters for second controller"); static int aha152x1[] = {0, 11, 7, 1, 1, 1, DELAY_DEFAULT, 0, DEBUG_DEFAULT}; #endif /* !defined(AHA152X_DEBUG) */ @@ -839,7 +839,7 @@ #endif #if !defined(MODULE) -static int __init do_setup(char *str) +static int __init do_setup(char *str, struct kernel_param *kp) { #if defined(AHA152X_DEBUG) @@ -855,7 +855,7 @@ return count"); MODULE_DESCRIPTION("Adaptec Aic77XX/78XX SCSI Host Bus Adapter driver"); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,10) MODULE_LICENSE("Dual BSD/GPL"); #endif -MODULE_PARM(aic7xxx, "s"); MODULE_PARM_DESC(aic7xxx, "period delimited, options string. verbose Enable verbose/diagnostic logging no_probe Disable EISA/VLB controller probing @@ -417,7 +404,6 @@ options aic7xxx='\"verbose.no_probe.tag_info:{{}.{}.{..10}}.seltime:1\"' "); -#endif static void ahc_linux_handle_scsi_status(struct ahc_softc *, struct ahc_linux_device *, @@ -994,7 +980,7 @@ * ie. aic7xxx=stpwlev:1,extended */ int -aic7xxx_setup(char *s) +aic7xxx_setup(char *s, struct kernel_param *kp) { int i, n; char *p; @@ -1038,13 +1024,10 @@ } } register_reboot_notifier(&ahc_linux_notifier); - return 1; + return 0; } -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,0) -__setup("aic7xxx=", aic7xxx_setup); -#endif - +PARAM_CALL(aic7xxx, aic7xxx_setup, NULL); int aic7xxx_verbose; /* @@ -1067,19 +1050,6 @@ printf("ahc_linux_detect: Unable to attach\n"); return (0); } -#ifdef MODULE - /* - * If we've been passed any parameters, process them now. - */ - if (aic7xxx) - aic7xxx_setup(aic7xxx); - if (dummy_buffer[0] != 'P') - printk(KERN_WARNING -"aic7xxx: Please read the file /usr/src/linux/drivers/scsi/README.aic7xxx\n" -"aic7xxx: to see the proper way to specify options to the aic7xxx module\n" -"aic7xxx: Specifically, don't use any commas when passing arguments to\n" -"aic7xxx: insmod or else it might trash certain memory areas.\n"); -#endif #if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,0) template->proc_name = "aic7xxx"; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/aic7xxx_old.c tmp2/drivers/scsi/aic7xxx_old.c --- tmp/drivers/scsi/aic7xxx_old.c Thu Nov 22 18:18:44 2001 +++ tmp2/drivers/scsi/aic7xxx_old.c Thu Nov 22 18:55:26 2001 @@ -1307,21 +1307,6 @@ * is the final value. */ static int aic7xxx_seltime = 0x10; -/* - * So that insmod can find the variable and make it point to something - */ -#ifdef MODULE -static char * aic7xxx = NULL; -MODULE_PARM(aic7xxx, "s"); - -/* - * Just in case someone uses commas to separate items on the insmod - * command line, we define a dummy buffer here to avoid having insmod - * write wild stuff into our code segment - */ -static char dummy_buffer[60] = "Please don't trounce on me insmod!!\n"; - -#endif #define VERBOSE_NORMAL 0x0000 #define VERBOSE_NEGOTIATION 0x0001 @@ -1420,7 +1405,7 @@ * ie. aic7xxx=unpause:0x0A,extended *-F*************************************************************************/ static int -aic7xxx_setup(char *s) +aic7xxx_setup(char *s, struct kernel_param *kp) { int i, n; char *p; @@ -1560,7 +1545,7 @@ return 1; } -__setup("aic7xxx=", aic7xxx_setup); +PARAM_CALL(aic7xxx, aic7xxx_setup, NULL); /*+F************************************************************************* * Function: @@ -9489,24 +9474,6 @@ #if defined(__i386__) || defined(__alpha__) unsigned char hcntrl, hostconf; unsigned int slot, base; -#endif - -#ifdef MODULE - /* - * If we are called as a module, the aic7xxx pointer may not be null - * and it would point to our bootup string, just like on the lilo - * command line. IF not NULL, then process this config string with - * aic7xxx_setup - */ - if(aic7xxx) - aic7xxx_setup(aic7xxx); - if(dummy_buffer[0] != 'P') - printk(KERN_WARNING "aic7xxx: Please read the file /usr/src/linux/drivers" - "/scsi/README.aic7xxx\n" - "aic7xxx: to see the proper way to specify options to the aic7xxx " - "module\n" - "aic7xxx: Specifically, don't use any commas when passing arguments to\n" - "aic7xxx: insmod or else it might trash certain memory areas.\n"); #endif template->proc_name = "aic7xxx"; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/atari_scsi.c tmp2/drivers/scsi/atari_scsi.c --- tmp/drivers/scsi/atari_scsi.c Wed Mar 7 14:44:37 2001 +++ tmp2/drivers/scsi/atari_scsi.c Thu Nov 22 18:55:26 2001 @@ -240,17 +240,17 @@ #endif static int setup_can_queue = -1; -MODULE_PARM(setup_can_queue, "i"); +PARAM(setup_can_queue, int, 000); static int setup_cmd_per_lun = -1; -MODULE_PARM(setup_cmd_per_lun, "i"); +PARAM(setup_cmd_per_lun, int, 000); static int setup_sg_tablesize = -1; -MODULE_PARM(setup_sg_tablesize, "i"); +PARAM(setup_sg_tablesize, int, 000); #ifdef SUPPORT_TAGS static int setup_use_tagged_queuing = -1; -MODULE_PARM(setup_use_tagged_queuing, "i"); +PARAM(setup_use_tagged_queuing, int, 000); #endif static int setup_hostid = -1; -MODULE_PARM(setup_hostid, "i"); +PARAM(setup_hostid, int, 000); #if defined(CONFIG_TT_DMA_EMUL) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/eata.c tmp2/drivers/scsi/eata.c --- tmp/drivers/scsi/eata.c Thu Nov 22 18:18:44 2001 +++ tmp2/drivers/scsi/eata.c Thu Nov 22 19:00:15 2001 @@ -402,15 +402,15 @@ #if defined(MODULE) #include -MODULE_PARM(boot_options, "s"); -MODULE_PARM(io_port, "1-" __MODULE_STRING(MAX_INT_PARAM) "i"); -MODULE_PARM(linked_comm, "i"); -MODULE_PARM(tagged_comm, "i"); -MODULE_PARM(link_statistics, "i"); -MODULE_PARM(max_queue_depth, "i"); -MODULE_PARM(tag_mode, "i"); -MODULE_PARM(ext_tran, "i"); -MODULE_PARM(rev_scan, "i"); +PARAM(boot_options, charp, 000); +PARAM_ARRAY(io_port, io_port, int, 1, MAX_INT_PARAM, 000); +PARAM(linked_comm, int, 000); +PARAM(tagged_comm, int, 000); +PARAM(link_statistics, int, 000); +PARAM(max_queue_depth, int, 000); +PARAM(tag_mode, int, 000); +PARAM(ext_tran, int, 000); +PARAM(rev_scan, int, 000); MODULE_AUTHOR("Dario Ballabio"); #endif @@ -1188,7 +1188,7 @@ return; } -static int option_setup(char *str) { +static int option_setup(char *str, struct kernel_param *kp) { int ints[MAX_INT_PARAM]; char *cur = str; int i = 1; @@ -1250,7 +1250,7 @@ tpnt->proc_name = "eata2x"; - if(boot_options) option_setup(boot_options); + if(boot_options) option_setup(boot_options, NULL); #if defined(MODULE) /* io_port could have been modified when loading as a module */ @@ -2074,7 +2074,6 @@ #include "scsi_module.c" -#ifndef MODULE -__setup("eata=", option_setup); +PARAM_CALL(eata, option_setup, NULL); #endif /* end MODULE */ MODULE_LICENSE("Dual BSD/GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/fdomain.c tmp2/drivers/scsi/fdomain.c --- tmp/drivers/scsi/fdomain.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/scsi/fdomain.c Thu Nov 22 18:55:26 2001 @@ -426,7 +426,7 @@ insmod fdomain fdomain=0x140,11 */ static char * fdomain = NULL; -MODULE_PARM(fdomain, "s"); +PARAM(fdomain, charp, 000); #endif static unsigned long addresses[] = { @@ -561,7 +561,7 @@ printk( "\n" ); } -static int __init fdomain_setup( char *str ) +static int __init fdomain_setup(char *str, struct kernel_param *kp) { int ints[4]; @@ -571,7 +571,7 @@ printk( "scsi: " " Usage: fdomain=,[,]\n" ); printk( "scsi: Bad LILO/INSMOD parameters?\n" ); - return 0; + return -EINVAL; } port_base = ints[0] >= 1 ? ints[1] : 0; @@ -580,10 +580,10 @@ bios_major = bios_minor = -1; /* Use geometry for BIOS version >= 3.4 */ ++setup_called; - return 1; + return 0; } -__setup("fdomain=", fdomain_setup); +PARAM_CALL(fdomain, fdomain_setup, NULL); static void do_pause( unsigned amount ) /* Pause for amount*10 milliseconds */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/g_NCR5380.c tmp2/drivers/scsi/g_NCR5380.c --- tmp/drivers/scsi/g_NCR5380.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/scsi/g_NCR5380.c Thu Nov 22 18:55:26 2001 @@ -903,63 +903,6 @@ #include #include "scsi_module.c" -#ifdef MODULE - -MODULE_PARM(ncr_irq, "i"); -MODULE_PARM(ncr_dma, "i"); -MODULE_PARM(ncr_addr, "i"); -MODULE_PARM(ncr_5380, "i"); -MODULE_PARM(ncr_53c400, "i"); -MODULE_PARM(ncr_53c400a, "i"); -MODULE_PARM(dtc_3181e, "i"); -MODULE_LICENSE("GPL"); -#else - -static int __init do_NCR5380_setup(char *str) -{ - int ints[10]; - - get_options(str, sizeof(ints)/sizeof(int), ints); - generic_NCR5380_setup(str,ints); - - return 1; -} - -static int __init do_NCR53C400_setup(char *str) -{ - int ints[10]; - - get_options(str, sizeof(ints)/sizeof(int), ints); - generic_NCR53C400_setup(str,ints); - - return 1; -} - -static int __init do_NCR53C400A_setup(char *str) -{ - int ints[10]; - - get_options(str, sizeof(ints)/sizeof(int), ints); - generic_NCR53C400A_setup(str,ints); - - return 1; -} - -static int __init do_DTC3181E_setup(char *str) -{ - int ints[10]; - - get_options(str, sizeof(ints)/sizeof(int), ints); - generic_DTC3181E_setup(str,ints); - - return 1; -} - -__setup("ncr5380=", do_NCR5380_setup); -__setup("ncr53c400=", do_NCR53C400_setup); -__setup("ncr53c400a=", do_NCR53C400A_setup); -__setup("dtc3181e=", do_DTC3181E_setup); - static struct isapnp_device_id id_table[] __devinitdata = { { ISAPNP_ANY_ID, ISAPNP_ANY_ID, @@ -972,6 +915,11 @@ MODULE_DEVICE_TABLE(isapnp, id_table); MODULE_LICENSE("GPL"); - -#endif +PARAM(ncr_irq, int, S_IRUGO); +PARAM(ncr_dma, int, S_IRUGO); +PARAM(ncr_addr, int, S_IRUGO); +PARAM(ncr_5380, int, S_IRUGO); +PARAM(ncr_53c400, int, S_IRUGO); +PARAM(ncr_53c400a, int, S_IRUGO); +PARAM(dtc_3181e, int, S_IRUGO); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/gdth.c tmp2/drivers/scsi/gdth.c --- tmp/drivers/scsi/gdth.c Thu Nov 22 18:18:44 2001 +++ tmp2/drivers/scsi/gdth.c Thu Nov 22 18:55:26 2001 @@ -671,23 +671,21 @@ /* shared access */ static int shared_access = 0; -#ifdef MODULE #if LINUX_VERSION_CODE >= 0x02011A -/* parameters for modprobe/insmod */ -MODULE_PARM(irq, "i"); -MODULE_PARM(disable, "i"); -MODULE_PARM(reserve_mode, "i"); -MODULE_PARM(reserve_list, "4-" __MODULE_STRING(MAX_RES_ARGS) "i"); -MODULE_PARM(reverse_scan, "i"); -MODULE_PARM(hdr_channel, "i"); -MODULE_PARM(max_ids, "i"); -MODULE_PARM(rescan, "i"); -MODULE_PARM(virt_ctr, "i"); -MODULE_PARM(shared_access, "i"); +/* parameters for modprobe/insmod, or cmdline */ +PARAM_ARRAY(irq, irq, int, 1, 1, 000); +PARAM(disable, int, 000); +PARAM(reserve_mode, int, 000); +PARAM_ARRAY(reserve_list, reserve_list, int, 4, MAX_RES_ARGS, 000); +PARAM(reverse_scan, int, 000); +PARAM(hdr_channel, int, 000); +PARAM(max_ids, int, 000); +PARAM(rescan, int, 000); +PARAM(virt_ctr, int, 000); +PARAM(shared_access, int, 000); MODULE_AUTHOR("Achim Leubner"); MODULE_LICENSE("GPL"); #endif -#endif /* /proc support */ #if LINUX_VERSION_CODE >= 0x010300 @@ -3929,24 +3927,6 @@ } } -GDTH_INITFUNC(int, option_setup(char *str)) -{ - int ints[MAXHA]; - char *cur = str; - int i = 1; - - TRACE2(("option_setup() str %s\n", str ? str:"NULL")); - - while (cur && isdigit(*cur) && i <= MAXHA) { - ints[i++] = simple_strtoul(cur, NULL, 0); - if ((cur = strchr(cur, ',')) != NULL) cur++; - } - - ints[0] = i - 1; - internal_setup(cur, ints); - return 1; -} - GDTH_INITFUNC(int, gdth_detect(Scsi_Host_Template *shtp)) { struct Scsi_Host *shp; @@ -4718,8 +4698,5 @@ static Scsi_Host_Template driver_template = GDTH; #include "scsi_module.c" -#ifndef MODULE -__setup("gdth=", option_setup); -#endif #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/ibmmca.c tmp2/drivers/scsi/ibmmca.c --- tmp/drivers/scsi/ibmmca.c Wed May 2 09:05:00 2001 +++ tmp2/drivers/scsi/ibmmca.c Thu Nov 22 18:55:26 2001 @@ -444,13 +444,13 @@ (that is kernel version 2.1.x) */ #if defined(MODULE) static char *boot_options = NULL; -MODULE_PARM(boot_options, "s"); -MODULE_PARM(io_port, "1-" __MODULE_STRING(IM_MAX_HOSTS) "i"); -MODULE_PARM(scsi_id, "1-" __MODULE_STRING(IM_MAX_HOSTS) "i"); -MODULE_PARM(display, "1i"); -MODULE_PARM(adisplay, "1i"); -MODULE_PARM(normal, "1i"); -MODULE_PARM(ansi, "1i"); +PARAM(boot_options, charp, 000); +PARAM_ARRAY(io_port, io_port, int, 1, IM_MAX_HOSTS, 000); +PARAM_ARRAY(scsi_id, scsi_id, int, 1, IM_MAX_HOSTS, 000); +PARAM(display, int, 000); +PARAM(adisplay, int, 000); +PARAM(normal, int, 000); +PARAM(ansi, int, 000); #endif /*counter of concurrent disk read/writes, to turn on/off disk led */ static int disk_rw_in_progress = 0; @@ -490,7 +490,7 @@ static int device_exists (int, int, int *, int *); static struct Scsi_Host *ibmmca_register(Scsi_Host_Template *, int, int, int, char *); -static int option_setup(char *); +static int option_setup(char *, struct kernel_param *kp); /* local functions needed for proc_info */ static int ldn_access_load(int, int); static int ldn_access_total_read_write(int); @@ -2546,7 +2546,7 @@ internal_ibmmca_scsi_setup (str, ints); } -static int option_setup(char *str) +static int option_setup(char *str, struct kernel_param *kp) { int ints[IM_MAX_HOSTS]; char *cur = str; @@ -2561,7 +2561,7 @@ return 0; } -__setup("ibmmcascsi=", option_setup); +PARAM_CALL(ibmmcascsi, option_setup, NULL); static Scsi_Host_Template driver_template = IBMMCA; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/in2000.c tmp2/drivers/scsi/in2000.c --- tmp/drivers/scsi/in2000.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/scsi/in2000.c Thu Nov 22 18:55:26 2001 @@ -182,7 +182,7 @@ static char *setup_strings = 0; #ifdef MODULE_PARM -MODULE_PARM(setup_strings, "s"); +PARAM(setup_strings, charp, 000); #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/ips.c tmp2/drivers/scsi/ips.c --- tmp/drivers/scsi/ips.c Thu Nov 22 18:18:45 2001 +++ tmp2/drivers/scsi/ips.c Thu Nov 22 18:55:26 2001 @@ -190,7 +190,7 @@ #ifdef MODULE static char *ips = NULL; - MODULE_PARM(ips, "s"); + PARAM(ips, charp, 000); #endif /* @@ -456,7 +456,7 @@ /****************************************************************************/ #if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,13) static int -ips_setup(char *ips_str) { +ips_setup(char *ips_str, struct kernel_param *kp) { #else void ips_setup(char *ips_str, int *dummy) { @@ -539,12 +539,12 @@ #endif #if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,13) - return (1); + return 0; #endif } #if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,13) -__setup("ips=", ips_setup); +PARAM_CALL(ips, ips_setup, NULL); #endif /****************************************************************************/ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/lasi700.c tmp2/drivers/scsi/lasi700.c --- tmp/drivers/scsi/lasi700.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/scsi/lasi700.c Thu Nov 22 18:55:26 2001 @@ -62,16 +62,12 @@ #include "lasi700.h" #include "53c700.h" -#ifdef MODULE - char *lasi700; /* command line from insmod */ MODULE_AUTHOR("James Bottomley"); MODULE_DESCRIPTION("lasi700 SCSI Driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(lasi700, "s"); - -#endif +PARAM(lasi700, charp, 000); #ifdef MODULE #define ARG_SEP ' ' @@ -82,6 +78,17 @@ static unsigned long __initdata opt_base; static int __initdata opt_irq; +static Scsi_Host_Template __initdata *host_tpnt = NULL; +static int __initdata host_count = 0; +static struct parisc_device_id lasi700_scsi_tbl[] = { + LASI700_ID_TABLE, + { 0 } +}; + +MODULE_DEVICE_TABLE(parisc, lasi700_scsi_tbl); + +static struct parisc_driver lasi700_driver = LASI700_DRIVER; + static int __init param_setup(char *string) { @@ -100,10 +107,6 @@ } return 1; } - -#ifndef MODULE -__setup("lasi700=", param_setup); -#endif static Scsi_Host_Template __initdata *host_tpnt = NULL; static int __initdata host_count = 0; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/mac_esp.c tmp2/drivers/scsi/mac_esp.c --- tmp/drivers/scsi/mac_esp.c Tue Nov 6 11:41:37 2001 +++ tmp2/drivers/scsi/mac_esp.c Thu Nov 22 18:55:26 2001 @@ -237,10 +237,10 @@ } #endif #endif - return 1; + return 0; } -__setup("mac53c9x=", mac_esp_setup); +PARAM_CALL(mac53c9x, mac_esp_setup, NULL); /* * ESP address 'detection' diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/mac_scsi.c tmp2/drivers/scsi/mac_scsi.c --- tmp/drivers/scsi/mac_scsi.c Sun Nov 12 14:01:11 2000 +++ tmp2/drivers/scsi/mac_scsi.c Thu Nov 22 18:55:26 2001 @@ -193,10 +193,10 @@ } #endif #endif - return 1; + return 0; } -__setup("mac5380=", mac_scsi_setup); +PARAM_CALL(mac5380, mac_scsi_setup, NULL); #if 0 #define MAC_ADDRESS(card) (ecard_address((card), ECARD_IOC, ECARD_SLOW) + 0x800) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/megaraid.c tmp2/drivers/scsi/megaraid.c --- tmp/drivers/scsi/megaraid.c Tue Nov 6 11:41:37 2001 +++ tmp2/drivers/scsi/megaraid.c Thu Nov 22 18:55:26 2001 @@ -731,7 +731,7 @@ static char *megaraid; #if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,0) /* 0x20100 */ #ifdef MODULE -MODULE_PARM (megaraid, "s"); +PARAM(megaraid, charp, 000); #endif #endif static int skip_id = -1; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/ncr53c8xx.c tmp2/drivers/scsi/ncr53c8xx.c --- tmp/drivers/scsi/ncr53c8xx.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/scsi/ncr53c8xx.c Thu Nov 22 18:55:26 2001 @@ -9184,22 +9184,13 @@ ** **========================================================== */ -#ifdef MODULE -char *ncr53c8xx = 0; /* command line passed by insmod */ -# if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,30) -MODULE_PARM(ncr53c8xx, "s"); -# endif -#endif - -int __init ncr53c8xx_setup(char *str) +int __init ncr53c8xx_setup(char *str, struct kernel_param *kp) { return sym53c8xx__setup(str); } #if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,13) -#ifndef MODULE -__setup("ncr53c8xx=", ncr53c8xx_setup); -#endif +PARAM_CALL(ncr53c8xx, ncr53c8xx_setup, NULL); #endif /*=================================================================== @@ -9242,11 +9233,6 @@ tpnt->proc_name = NAME53C8XX; #endif tpnt->proc_info = ncr53c8xx_proc_info; -#endif - -#if defined(SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT) && defined(MODULE) -if (ncr53c8xx) - ncr53c8xx_setup(ncr53c8xx); #endif return sym53c8xx__detect(tpnt, ncr_chip_ids, diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/osst.c tmp2/drivers/scsi/osst.c --- tmp/drivers/scsi/osst.c Thu Nov 22 18:18:45 2001 +++ tmp2/drivers/scsi/osst.c Thu Nov 22 18:55:26 2001 @@ -85,10 +85,10 @@ MODULE_DESCRIPTION("OnStream SCSI Tape Driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(buffer_kbs, "i"); -MODULE_PARM(write_threshold_kbs, "i"); -MODULE_PARM(max_buffers, "i"); -MODULE_PARM(max_sg_segs, "i"); +PARAM(buffer_kbs, int, 000); +PARAM(write_threshold_kbs, int, 000); +PARAM(max_buffers, int, 000); +PARAM(max_sg_segs, int, 000); #else static struct osst_dev_parm { char *name; @@ -5248,48 +5248,6 @@ // sizeof(os_header_t),sizeof(os_header_t)==OS_DATA_SIZE?"ok":"error"); #endif } - -#ifndef MODULE -/* Set the boot options. Syntax: osst=xxx,yyy,... - where xxx is buffer size in 1024 byte blocks and yyy is write threshold - in 1024 byte blocks. */ -static int __init osst_setup (char *str) -{ - int i, ints[5]; - char *stp; - - stp = get_options(str, ARRAY_SIZE(ints), ints); - - if (ints[0] > 0) { - for (i = 0; i < ints[0] && i < ARRAY_SIZE(parms); i++) - *parms[i].val = ints[i + 1]; - } else { - while (stp != NULL) { - for (i = 0; i < ARRAY_SIZE(parms); i++) { - int len = strlen(parms[i].name); - if (!strncmp(stp, parms[i].name, len) && - (*(stp + len) == ':' || *(stp + len) == '=')) { - *parms[i].val = - simple_strtoul(stp + len + 1, NULL, 0); - break; - } - } - if (i >= sizeof(parms) / sizeof(struct osst_dev_parm)) - printk(KERN_INFO "osst :I: Illegal parameter in '%s'\n", - stp); - stp = strchr(stp, ','); - if (stp) - stp++; - } - } - - return 1; -} - -__setup("osst=", osst_setup); - -#endif - static struct file_operations osst_fops = { read: osst_read, diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/pas16.c tmp2/drivers/scsi/pas16.c --- tmp/drivers/scsi/pas16.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/scsi/pas16.c Thu Nov 22 18:55:26 2001 @@ -604,7 +604,7 @@ #include "scsi_module.c" #ifdef MODULE -MODULE_PARM(pas16_addr, "h"); -MODULE_PARM(pas16_irq, "i"); +PARAM(pas16_addr, short, 000); +PARAM(pas16_irq, int, 000); #endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/pcmcia/aha152x_stub.c tmp2/drivers/scsi/pcmcia/aha152x_stub.c --- tmp/drivers/scsi/pcmcia/aha152x_stub.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/scsi/pcmcia/aha152x_stub.c Thu Nov 22 18:55:26 2001 @@ -59,7 +59,7 @@ #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); +PARAM(pc_debug, int, 000); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) static char *version = "aha152x_cs.c 1.54 2000/06/12 21:27:25 (David Hinds)"; @@ -83,14 +83,14 @@ static int reset_delay = 100; static int ext_trans = 0; -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); -MODULE_PARM(host_id, "i"); -MODULE_PARM(reconnect, "i"); -MODULE_PARM(parity, "i"); -MODULE_PARM(synchronous, "i"); -MODULE_PARM(reset_delay, "i"); -MODULE_PARM(ext_trans, "i"); +PARAM(irq_mask, int, 000); +PARAM_ARRAY(irq_list, irq_list, int, 1, 4, 000); +PARAM(host_id, int, 000); +PARAM(reconnect, int, 000); +PARAM(parity, int, 000); +PARAM(synchronous, int, 000); +PARAM(reset_delay, int, 000); +PARAM(ext_trans, int, 000); MODULE_LICENSE("Dual MPL/GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/pcmcia/fdomain_stub.c tmp2/drivers/scsi/pcmcia/fdomain_stub.c --- tmp/drivers/scsi/pcmcia/fdomain_stub.c Sat Mar 3 13:38:39 2001 +++ tmp2/drivers/scsi/pcmcia/fdomain_stub.c Thu Nov 22 18:55:26 2001 @@ -56,7 +56,7 @@ #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); +PARAM(pc_debug, int, 000); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) static char *version = "fdomain_cs.c 1.43 2000/06/12 21:27:25 (David Hinds)"; @@ -72,8 +72,8 @@ static u_int irq_mask = 0xdeb8; static int irq_list[4] = { -1 }; -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); +PARAM(irq_mask, int, 000); +PARAM_ARRAY(irq_list, irq_list, int, 1, 4, 000); /*====================================================================*/ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/pcmcia/nsp_cs.c tmp2/drivers/scsi/pcmcia/nsp_cs.c --- tmp/drivers/scsi/pcmcia/nsp_cs.c Fri Oct 12 02:04:57 2001 +++ tmp2/drivers/scsi/pcmcia/nsp_cs.c Thu Nov 22 18:55:26 2001 @@ -71,7 +71,7 @@ #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); +PARAM(pc_debug, int, 000); MODULE_PARM_DESC(pc_debug, "set debug level"); static char *version = "$Id: nsp_cs.c,v 1.42 2001/09/10 10:30:58 elca Exp $"; #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) @@ -107,11 +107,11 @@ /* Parameters that can be set with 'insmod' */ static unsigned int irq_mask = 0xffff; -MODULE_PARM(irq_mask, "i"); +PARAM(irq_mask, int, 000); MODULE_PARM_DESC(irq_mask, "IRQ mask bits"); static int irq_list[4] = { -1 }; -MODULE_PARM(irq_list, "1-4i"); +PARAM_ARRAY(irq_list, irq_list, int, 1, 4, 000); MODULE_PARM_DESC(irq_list, "IRQ number list"); /*----------------------------------------------------------------*/ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/pcmcia/qlogic_stub.c tmp2/drivers/scsi/pcmcia/qlogic_stub.c --- tmp/drivers/scsi/pcmcia/qlogic_stub.c Sat Mar 3 13:38:39 2001 +++ tmp2/drivers/scsi/pcmcia/qlogic_stub.c Thu Nov 22 18:55:26 2001 @@ -63,7 +63,7 @@ #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); +PARAM(pc_debug, int, 000); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) static char *version = "qlogic_cs.c 1.79 2000/06/12 21:27:26 (David Hinds)"; @@ -79,8 +79,8 @@ static u_int irq_mask = 0xdeb8; static int irq_list[4] = { -1 }; -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); +PARAM(irq_mask, int, 000); +PARAM_ARRAY(irq_list, irq_list, int, 1, 4, 000); /*====================================================================*/ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/qla1280.c tmp2/drivers/scsi/qla1280.c --- tmp/drivers/scsi/qla1280.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/scsi/qla1280.c Thu Nov 22 18:55:26 2001 @@ -415,7 +415,7 @@ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,18) /* insmod qla1280 options=verbose" */ -MODULE_PARM(options, "s"); +PARAM(options, charp, 000); #endif /* * Just in case someone uses commas to separate items on the insmod diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/scsi.c tmp2/drivers/scsi/scsi.c --- tmp/drivers/scsi/scsi.c Thu Nov 22 18:18:45 2001 +++ tmp2/drivers/scsi/scsi.c Thu Nov 22 18:55:26 2001 @@ -192,29 +192,8 @@ SDpnt->request_queue.queuedata = (void *) SDpnt; } -#ifdef MODULE -MODULE_PARM(scsi_logging_level, "i"); -MODULE_PARM_DESC(scsi_logging_level, "SCSI logging level; should be zero or nonzero"); - -#else - -static int __init scsi_logging_setup(char *str) -{ - int tmp; - - if (get_option(&str, &tmp) == 1) { - scsi_logging_level = (tmp ? ~0 : 0); - return 1; - } else { - printk(KERN_INFO "scsi_logging_setup : usage scsi_logging_level=n " - "(n should be 0 or non-zero)\n"); - return 0; - } -} - -__setup("scsi_logging=", scsi_logging_setup); - -#endif +PARAM(scsi_logging_level, int, S_IRUGO|S_IWUSR); +/*MODULE_PARM_DESC(scsi_logging_level, "SCSI logging level; should be zero or nonzero");*/ /* * Issue a command and wait for it to complete @@ -2037,10 +2016,13 @@ for (shpnt = scsi_hostlist; shpnt; shpnt = shpnt->next) { for (SDpnt = shpnt->host_queue; SDpnt; SDpnt = SDpnt->next) { + /* Why the module count???? --RR */ +#if 0 if (SDpnt->host->hostt == tpnt && SDpnt->host->hostt->module && GET_USE_COUNT(SDpnt->host->hostt->module)) goto err_out; +#endif /* * FIXME(eric) - We need to find a way to notify the * low level driver that we are shutting down - via the @@ -2316,11 +2298,15 @@ struct Scsi_Device_Template *prev_spnt; lock_kernel(); + +/* Why do you care about use count??? --RR */ +#if 0 /* * If we are busy, this is not going to fly. */ if (GET_USE_COUNT(tpnt->module) != 0) goto error_out; +#endif /* * Next, detach the devices from the driver. @@ -2550,19 +2536,9 @@ static char *scsihosts; -MODULE_PARM(scsihosts, "s"); +PARAM(scsihosts, charp, S_IRUGO); MODULE_DESCRIPTION("SCSI core"); MODULE_LICENSE("GPL"); - -#ifndef MODULE -int __init scsi_setup(char *str) -{ - scsihosts = str; - return 1; -} - -__setup("scsihosts=", scsi_setup); -#endif static int __init init_scsi(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/scsi_scan.c tmp2/drivers/scsi/scsi_scan.c --- tmp/drivers/scsi/scsi_scan.c Fri Oct 12 02:43:30 2001 +++ tmp2/drivers/scsi/scsi_scan.c Thu Nov 22 18:55:26 2001 @@ -175,30 +175,8 @@ static unsigned int max_scsi_luns = 1; #endif -#ifdef MODULE - -MODULE_PARM(max_scsi_luns, "i"); -MODULE_PARM_DESC(max_scsi_luns, "last scsi LUN (should be between 1 and 2^32-1)"); - -#else - -static int __init scsi_luns_setup(char *str) -{ - unsigned int tmp; - - if (get_option(&str, &tmp) == 1) { - max_scsi_luns = tmp; - return 1; - } else { - printk("scsi_luns_setup : usage max_scsi_luns=n " - "(n should be between 1 and 2^32-1)\n"); - return 0; - } -} - -__setup("max_scsi_luns=", scsi_luns_setup); - -#endif +PARAM(max_scsi_luns, int, S_IRUGO); +/*MODULE_PARM_DESC(max_scsi_luns, "last scsi LUN (should be between 1 and 2^32-1)");*/ static void print_inquiry(unsigned char *data) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/seagate.c tmp2/drivers/scsi/seagate.c --- tmp/drivers/scsi/seagate.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/scsi/seagate.c Thu Nov 22 18:55:26 2001 @@ -249,14 +249,14 @@ static volatile int st0x_aborted = 0; /* set when we are aborted, ie by a time out, etc. */ -static unsigned char controller_type = 0; /* set to SEAGATE for ST0x +static unsigned int controller_type = 0; /* set to SEAGATE for ST0x boards or FD for TMC-8xx boards */ static int irq = IRQ; -MODULE_PARM (base_address, "i"); -MODULE_PARM (controller_type, "b"); -MODULE_PARM (irq, "i"); +PARAM(base_address, int, S_IRUGO); +PARAM(controller_type, uint, S_IRUGO); +PARAM(irq, int, S_IRUGO); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/sg.c tmp2/drivers/scsi/sg.c --- tmp/drivers/scsi/sg.c Tue Nov 6 11:41:37 2001 +++ tmp2/drivers/scsi/sg.c Thu Nov 22 18:55:26 2001 @@ -1203,27 +1203,6 @@ return 0; } -#ifndef MODULE -static int __init sg_def_reserved_size_setup(char *str) -{ - int tmp; - - if (get_option(&str, &tmp) == 1) { - def_reserved_size = tmp; - if (tmp >= 0) - sg_big_buff = tmp; - return 1; - } else { - printk("sg_def_reserved_size : usage sg_def_reserved_size=n " - "(n could be 65536, 131072 or 262144)\n"); - return 0; - } -} - -__setup("sg_def_reserved_size=", sg_def_reserved_size_setup); -#endif - - static int sg_attach(Scsi_Device * scsidp) { Sg_device * sdp; @@ -1375,7 +1354,7 @@ MODULE_DESCRIPTION("SCSI generic (sg) driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(def_reserved_size, "i"); +PARAM(def_reserved_size, int, 000); MODULE_PARM_DESC(def_reserved_size, "size of buffer reserved for each fd"); static int __init init_sg(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/sim710.c tmp2/drivers/scsi/sim710.c --- tmp/drivers/scsi/sim710.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/scsi/sim710.c Thu Nov 22 18:55:26 2001 @@ -189,7 +189,7 @@ MODULE_DESCRIPTION("Simple NCR53C710 driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(sim710, "s"); +PARAM(sim710, charp, 000); #endif @@ -304,7 +304,7 @@ #endif static int -param_setup(char *str) +param_setup(char *str, struct kernel_param *kp) { char *cur = str; char *pc, *pv; @@ -342,7 +342,7 @@ opt_noneg = val; else if (!strncmp(cur, "disabled:", 5)) { no_of_boards = -1; - return 1; + return 0; } #ifdef DEBUG else if (!strncmp(cur, "debug:", 6)) { @@ -355,13 +355,11 @@ if ((cur = strchr(cur, ARG_SEP)) != NULL) ++cur; } - return 1; + return 0; } #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13) -#ifndef MODULE -__setup("sim710=", param_setup); -#endif +PARAM_CALL(sim710, param_setup, NULL); #else /* Old boot param syntax support */ void diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/sr.c tmp2/drivers/scsi/sr.c --- tmp/drivers/scsi/sr.c Tue Nov 6 11:41:37 2001 +++ tmp2/drivers/scsi/sr.c Thu Nov 22 18:55:26 2001 @@ -56,8 +56,6 @@ #include /* For the door lock/unlock commands */ #include "constants.h" -MODULE_PARM(xa_test, "i"); /* see sr_ioctl.c */ - #define MAX_RETRIES 3 #define SR_TIMEOUT (30 * HZ) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/sr_ioctl.c tmp2/drivers/scsi/sr_ioctl.c --- tmp/drivers/scsi/sr_ioctl.c Tue Oct 16 06:27:42 2001 +++ tmp2/drivers/scsi/sr_ioctl.c Thu Nov 22 18:55:26 2001 @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -22,6 +23,7 @@ /* The sr_is_xa() seems to trigger firmware bugs with some drives :-( * It is off by default and can be turned on with this module parameter */ static int xa_test = 0; +PARAM(xa_test, int, S_IRUGO); extern void get_sectorsize(int); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/st.c tmp2/drivers/scsi/st.c --- tmp/drivers/scsi/st.c Thu Nov 22 18:18:45 2001 +++ tmp2/drivers/scsi/st.c Thu Nov 22 18:55:26 2001 @@ -80,38 +80,17 @@ MODULE_DESCRIPTION("SCSI Tape Driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(buffer_kbs, "i"); +PARAM(buffer_kbs, int, 000); MODULE_PARM_DESC(buffer_kbs, "Default driver buffer size (KB; 32)"); -MODULE_PARM(write_threshold_kbs, "i"); +PARAM(write_threshold_kbs, int, 000); MODULE_PARM_DESC(write_threshold_kbs, "Asynchronous write threshold (KB; 30)"); -MODULE_PARM(max_buffers, "i"); +PARAM(max_buffers, int , 000); MODULE_PARM_DESC(max_buffers, "Maximum number of buffer allocated at initialisation (4)"); -MODULE_PARM(max_sg_segs, "i"); +PARAM(max_sg_segs, int, 000); MODULE_PARM_DESC(max_sg_segs, "Maximum number of scatter/gather segments to use (32)"); EXPORT_NO_SYMBOLS; -#ifndef MODULE -static struct st_dev_parm { - char *name; - int *val; -} parms[] __initdata = { - { - "buffer_kbs", &buffer_kbs - }, - { - "write_threshold_kbs", &write_threshold_kbs - }, - { - "max_buffers", &max_buffers - }, - { - "max_sg_segs", &max_sg_segs - } -}; -#endif - - /* The default definitions have been moved to st_options.h */ #define ST_BUFFER_SIZE (ST_BUFFER_BLOCKS * ST_KILOBYTE) @@ -3550,49 +3529,6 @@ if (max_sg_segs >= ST_FIRST_SG) st_max_sg_segs = max_sg_segs; } - -#ifndef MODULE -/* Set the boot options. Syntax is defined in README.st. - */ -static int __init st_setup(char *str) -{ - int i, len, ints[5]; - char *stp; - - stp = get_options(str, ARRAY_SIZE(ints), ints); - - if (ints[0] > 0) { - for (i = 0; i < ints[0] && i < ARRAY_SIZE(parms); i++) - *parms[i].val = ints[i + 1]; - } else { - while (stp != NULL) { - for (i = 0; i < ARRAY_SIZE(parms); i++) { - len = strlen(parms[i].name); - if (!strncmp(stp, parms[i].name, len) && - (*(stp + len) == ':' || *(stp + len) == '=')) { - *parms[i].val = - simple_strtoul(stp + len + 1, NULL, 0); - break; - } - } - if (i >= sizeof(parms) / sizeof(struct st_dev_parm)) - printk(KERN_WARNING "st: illegal parameter in '%s'\n", - stp); - stp = strchr(stp, ','); - if (stp) - stp++; - } - } - - validate_options(); - - return 1; -} - -__setup("st=", st_setup); - -#endif - static struct file_operations st_fops = { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/sym53c416.c tmp2/drivers/scsi/sym53c416.c --- tmp/drivers/scsi/sym53c416.c Mon Oct 1 05:26:07 2001 +++ tmp2/drivers/scsi/sym53c416.c Thu Nov 22 18:55:26 2001 @@ -849,10 +849,10 @@ MODULE_AUTHOR("Lieven Willems"); MODULE_LICENSE("GPL"); -MODULE_PARM(sym53c416, "1-2i"); -MODULE_PARM(sym53c416_1, "1-2i"); -MODULE_PARM(sym53c416_2, "1-2i"); -MODULE_PARM(sym53c416_3, "1-2i"); +PARAM_ARRAY(sym53c416, sym53c416, int, 1, 2, 000); +PARAM_ARRAY(sym53c416_1, sym53c416_1, int, 1, 2, 000); +PARAM_ARRAY(sym53c416_2, sym53c416_2, int, 1, 2, 000); +PARAM_ARRAY(sym53c416_3, sym53c416_3, int, 1, 2, 000); #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/sym53c8xx.c tmp2/drivers/scsi/sym53c8xx.c --- tmp/drivers/scsi/sym53c8xx.c Thu Oct 18 07:16:39 2001 +++ tmp2/drivers/scsi/sym53c8xx.c Thu Nov 22 18:55:26 2001 @@ -1320,7 +1320,7 @@ # ifdef MODULE char *sym53c8xx = 0; /* command line passed by insmod */ # if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,30) -MODULE_PARM(sym53c8xx, "s"); +PARAM(sym53c8xx, charp, 000); # endif # endif #endif @@ -12639,7 +12639,7 @@ } -int __init sym53c8xx_setup(char *str) +int __init sym53c8xx_setup(char *str, struct kernel_param *kp) { #ifdef SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT char *cur = str; @@ -12759,12 +12759,12 @@ ++cur; } #endif /* SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT */ - return 1; + return 0; } #if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,13) #ifndef MODULE -__setup("sym53c8xx=", sym53c8xx_setup); +PARAM_CALL(sym53c8xx, sym53c8xx_setup, NULL); #endif #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/tmscsim.c tmp2/drivers/scsi/tmscsim.c --- tmp/drivers/scsi/tmscsim.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/scsi/tmscsim.c Thu Nov 22 18:55:26 2001 @@ -484,12 +484,9 @@ /* Startup values, to be overriden on the commandline */ int tmscsim[] = {-2, -2, -2, -2, -2, -2}; -# if defined(MODULE) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,30) -MODULE_PARM(tmscsim, "1-6i"); +# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,30) +PARAM_ARRAY(tmscsim, tmscsim, int, 1, 6, 000); MODULE_PARM_DESC(tmscsim, "Host SCSI ID, Speed (0=10MHz), Device Flags, Adapter Flags, Max Tags (log2(tags)-1), DelayReset (s)"); -# endif - -#if defined(MODULE) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,30) MODULE_AUTHOR("C.L. Huang / Kurt Garloff"); MODULE_DESCRIPTION("SCSI host adapter driver for Tekram DC390 and other AMD53C974A based PCI SCSI adapters"); MODULE_LICENSE("GPL"); @@ -657,48 +654,6 @@ if (tmscsim[5] > 180) tmscsim[5] = 180; }; #endif - -/* Override defaults on cmdline: - * tmscsim: AdaptID, MaxSpeed (Index), DevMode (Bitmapped), AdaptMode (Bitmapped) - */ -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,13) -int __init dc390_setup (char *str) -{ - int ints[8]; - int i, im; - (void)get_options (str, ARRAY_SIZE(ints), ints); - im = ints[0]; - if (im > 6) - { - printk (KERN_NOTICE "DC390: ignore extra params!\n"); - im = 6; - }; - for (i = 0; i < im; i++) - tmscsim[i] = ints[i+1]; - /* dc390_checkparams (); */ - return 1; -}; -#ifndef MODULE -__setup("tmscsim=", dc390_setup); -#endif - -#else -void __init dc390_setup (char *str, int *ints) -{ - int i, im; - im = ints[0]; - if (im > 6) - { - printk (KERN_NOTICE "DC390: ignore extra params!\n"); - im = 6; - }; - for (i = 0; i < im; i++) - tmscsim[i] = ints[i+1]; - /* dc390_checkparams (); */ -}; -#endif - - static void __init dc390_EEpromOutDI( PDEVDECL, PUCHAR regval, UCHAR Carry ) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/u14-34f.c tmp2/drivers/scsi/u14-34f.c --- tmp/drivers/scsi/u14-34f.c Tue Nov 6 11:41:37 2001 +++ tmp2/drivers/scsi/u14-34f.c Thu Nov 22 18:55:26 2001 @@ -343,13 +343,13 @@ #define MAX_INT_PARAM 10 -MODULE_PARM(boot_options, "s"); -MODULE_PARM(io_port, "1-" __MODULE_STRING(MAX_INT_PARAM) "i"); -MODULE_PARM(linked_comm, "i"); -MODULE_PARM(have_old_firmware, "i"); -MODULE_PARM(link_statistics, "i"); -MODULE_PARM(max_queue_depth, "i"); -MODULE_PARM(ext_tran, "i"); +PARAM(boot_options, charp, 000); +PARAM_ARRAY(io_port, io_port, int, 1, MAX_INT_PARAM, 000); +PARAM(linked_comm, int, 000); +PARAM(have_old_firmware, int, 000); +PARAM(link_statistics, int, 000); +PARAM(max_queue_depth, int, 000); +PARAM(ext_tran, int, 000); MODULE_AUTHOR("Dario Ballabio"); #include @@ -935,7 +935,7 @@ return; } -static int option_setup(char *str) { +static int option_setup(char *str, struct kernel_param *kp) { int ints[MAX_INT_PARAM]; char *cur = str; int i = 1; @@ -957,7 +957,7 @@ tpnt->proc_name = "u14-34f"; - if(boot_options) option_setup(boot_options); + if(boot_options) option_setup(boot_options, NULL); #if defined(MODULE) /* io_port could have been modified when loading as a module */ @@ -1757,6 +1757,4 @@ #include "scsi_module.c" -#ifndef MODULE -__setup("u14-34f=", option_setup); -#endif /* end MODULE */ +PARAM_CALL(u14_34f, option_setup, NULL); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/wd33c93.c tmp2/drivers/scsi/wd33c93.c --- tmp/drivers/scsi/wd33c93.c Tue Nov 6 11:41:37 2001 +++ tmp2/drivers/scsi/wd33c93.c Thu Nov 22 18:55:26 2001 @@ -166,13 +166,9 @@ static char *setup_args[] = {"","","","","","","","",""}; -/* filled in by 'insmod' */ +/* filled in by modprobe/boot line */ static char *setup_strings = 0; - -#ifdef MODULE_PARM -MODULE_PARM(setup_strings, "s"); -#endif - +PARAM(setup_strings, charp, 000); static inline uchar read_wd33c93(const wd33c93_regs regs, uchar reg_num) @@ -1690,9 +1686,6 @@ return 1; } - -__setup("wd33c93", wd33c93_setup); - /* check_setup_args() returns index if key found, 0 if not */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/scsi/wd7000.c tmp2/drivers/scsi/wd7000.c --- tmp/drivers/scsi/wd7000.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/scsi/wd7000.c Thu Nov 22 18:55:26 2001 @@ -558,7 +558,7 @@ #ifdef MODULE static char * wd7000 = NULL; -MODULE_PARM(wd7000, "s"); +PARAM(wd7000, charp, 000); #endif /* @@ -602,7 +602,7 @@ * will configure the driver for a WD-7000 controller * using IRQ 15 with a DMA channel 6, at IO base address 0x350. */ -static int __init wd7000_setup(char *str) +static int __init wd7000_setup(char *str, struct kernel_param *kp) { static short wd7000_card_num = 0; short i, j; @@ -697,7 +697,7 @@ return 1; } -__setup("wd7000=", wd7000_setup); +PARAM_CALL(wd7000, wd7000_setup, NULL); #ifdef ANY2SCSI_INLINE /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/aci.c tmp2/drivers/sound/aci.c --- tmp/drivers/sound/aci.c Thu Nov 22 18:18:45 2001 +++ tmp2/drivers/sound/aci.c Thu Nov 22 18:59:20 2001 @@ -84,18 +84,18 @@ #ifdef MODULE static int reset; -MODULE_PARM(reset,"i"); +PARAM(reset, bool, 000); MODULE_PARM_DESC(reset,"When set to 1, reset aci mixer."); #else static int reset = 1; #endif static int ide=-1; -MODULE_PARM(ide,"i"); +PARAM(ide, bool, 000); MODULE_PARM_DESC(ide,"1 enable, 0 disable ide-port - untested" " default: do nothing"); static int wss=-1; -MODULE_PARM(wss,"i"); +PARAM(wss, bool, 000); MODULE_PARM_DESC(wss,"change between ACI/WSS-mixer; use 0 and 1 - untested" " default: do nothing; for PCM1-pro only"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/ad1816.c tmp2/drivers/sound/ad1816.c --- tmp/drivers/sound/ad1816.c Thu Nov 22 18:18:45 2001 +++ tmp2/drivers/sound/ad1816.c Thu Nov 22 18:55:26 2001 @@ -1266,19 +1266,19 @@ static int isapnp = 1; static int isapnpjump = 0; -MODULE_PARM(isapnp, "i"); -MODULE_PARM(isapnpjump, "i"); +PARAM(isapnp, int, 000); +PARAM(isapnpjump, int, 000); #else static int isapnp = 0; #endif -MODULE_PARM(io,"i"); -MODULE_PARM(irq,"i"); -MODULE_PARM(dma,"i"); -MODULE_PARM(dma2,"i"); -MODULE_PARM(ad1816_clockfreq,"i"); -MODULE_PARM(options,"i"); +PARAM(io, int, 000); +PARAM(irq, int, 000); +PARAM(dma, int, 000); +PARAM(dma2, int, 000); +PARAM(ad1816_clockfreq, int, 000); +PARAM(options, int, 000); #if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE @@ -1456,23 +1456,4 @@ module_init(init_ad1816); module_exit(cleanup_ad1816); - -#ifndef MODULE -static int __init setup_ad1816(char *str) -{ - /* io, irq, dma, dma2 */ - int ints[5]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma2 = ints[4]; - - return 1; -} - -__setup("ad1816=", setup_ad1816); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/ad1848.c tmp2/drivers/sound/ad1848.c --- tmp/drivers/sound/ad1848.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/ad1848.c Thu Nov 22 18:55:26 2001 @@ -2821,19 +2821,19 @@ static int __initdata dma2 = -1; static int __initdata type = 0; -MODULE_PARM(io, "i"); /* I/O for a raw AD1848 card */ -MODULE_PARM(irq, "i"); /* IRQ to use */ -MODULE_PARM(dma, "i"); /* First DMA channel */ -MODULE_PARM(dma2, "i"); /* Second DMA channel */ -MODULE_PARM(type, "i"); /* Card type */ -MODULE_PARM(deskpro_xl, "i"); /* Special magic for Deskpro XL boxen */ -MODULE_PARM(deskpro_m, "i"); /* Special magic for Deskpro M box */ -MODULE_PARM(soundpro, "i"); /* More special magic for SoundPro chips */ +PARAM(io, int, 000); /* I/O for a raw AD1848 card */ +PARAM(irq, int, 000); /* IRQ to use */ +PARAM(dma, int, 000); /* First DMA channel */ +PARAM(dma2, int, 000); /* Second DMA channel */ +PARAM(type, int, 000); /* Card type */ +PARAM(deskpro_xl, int, 000); /* Special magic for Deskpro XL boxen */ +PARAM(deskpro_m, int, 000); /* Special magic for Deskpro M box */ +PARAM(soundpro, int, 000); /* More special magic for SoundPro chips */ #if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE -MODULE_PARM(isapnp, "i"); -MODULE_PARM(isapnpjump, "i"); -MODULE_PARM(reverse, "i"); +PARAM(isapnp, bool, 000); +PARAM(isapnpjump, int, 000); +PARAM(reverse, bool, 000); MODULE_PARM_DESC(isapnp, "When set to 0, Plug & Play support will be disabled"); MODULE_PARM_DESC(isapnpjump, "Jumps to a specific slot in the driver's PnP table. Use the source, Luke."); MODULE_PARM_DESC(reverse, "When set to 1, will reverse ISAPnP search order"); @@ -3044,24 +3044,4 @@ module_init(init_ad1848); module_exit(cleanup_ad1848); - -#ifndef MODULE -static int __init setup_ad1848(char *str) -{ - /* io, irq, dma, dma2, type */ - int ints[6]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma2 = ints[4]; - type = ints[5]; - - return 1; -} - -__setup("ad1848=", setup_ad1848); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/adlib_card.c tmp2/drivers/sound/adlib_card.c --- tmp/drivers/sound/adlib_card.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/adlib_card.c Thu Nov 22 18:55:26 2001 @@ -31,7 +31,7 @@ static int __initdata io = -1; -MODULE_PARM(io, "i"); +PARAM(io, int, 000); static int __init init_adlib(void) { @@ -56,18 +56,4 @@ module_init(init_adlib); module_exit(cleanup_adlib); - -#ifndef MODULE -static int __init setup_adlib(char *str) -{ - /* io */ - int ints[2]; - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - - return 1; -} -__setup("adlib=", setup_adlib); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/aedsp16.c tmp2/drivers/sound/aedsp16.c --- tmp/drivers/sound/aedsp16.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/aedsp16.c Thu Nov 22 18:55:26 2001 @@ -1311,17 +1311,17 @@ static int __initdata mss_base = -1; static int __initdata mpu_base = -1; -MODULE_PARM(io, "i"); +PARAM(io, int, 000); MODULE_PARM_DESC(io, "I/O base address (0x220 0x240)"); -MODULE_PARM(irq, "i"); +PARAM(irq, int, 000); MODULE_PARM_DESC(irq, "IRQ line (5 7 9 10 11)"); -MODULE_PARM(dma, "i"); +PARAM(dma, int, 000); MODULE_PARM_DESC(dma, "dma line (0 1 3)"); -MODULE_PARM(mpu_irq, "i"); +PARAM(mpu_irq, int, 000); MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ line (5 7 9 10 0)"); -MODULE_PARM(mss_base, "i"); +PARAM(mss_base, int, 000); MODULE_PARM_DESC(mss_base, "MSS emulation I/O base address (0x530 0xE80)"); -MODULE_PARM(mpu_base, "i"); +PARAM(mpu_base, int, 000); MODULE_PARM_DESC(mpu_base,"MPU-401 I/O base address (0x300 0x310 0x320 0x330)"); MODULE_AUTHOR("Riccardo Facchetti "); MODULE_DESCRIPTION("Audio Excel DSP 16 Driver Version " VERSION); @@ -1359,23 +1359,3 @@ module_init(do_init_aedsp16); module_exit(cleanup_aedsp16); - -#ifndef MODULE -static int __init setup_aedsp16(char *str) -{ - /* io, irq, dma, mss_io, mpu_io, mpu_irq */ - int ints[7]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - mss_base = ints[4]; - mpu_base = ints[5]; - mpu_irq = ints[6]; - return 1; -} - -__setup("aedsp16=", setup_aedsp16); -#endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/awe_wave.c tmp2/drivers/sound/awe_wave.c --- tmp/drivers/sound/awe_wave.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/awe_wave.c Thu Nov 22 18:55:26 2001 @@ -215,11 +215,11 @@ MODULE_DESCRIPTION("SB AWE32/64 WaveTable driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(io, "i"); +PARAM(io, int, 000); MODULE_PARM_DESC(io, "base i/o port of Emu8000"); -MODULE_PARM(memsize, "i"); +PARAM(memsize, int, 000); MODULE_PARM_DESC(memsize, "onboard DRAM size in Kbytes"); -MODULE_PARM(isapnp, "i"); +PARAM(isapnp, int, 000); MODULE_PARM_DESC(isapnp, "use ISAPnP detection"); EXPORT_NO_SYMBOLS; @@ -6141,21 +6141,3 @@ module_init(attach_awe); module_exit(unload_awe); - -#ifndef MODULE -static int __init setup_awe(char *str) -{ - /* io, memsize, isapnp */ - int ints[4]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - memsize = ints[2]; - isapnp = ints[3]; - - return 1; -} - -__setup("awe=", setup_awe); -#endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/btaudio.c tmp2/drivers/sound/btaudio.c --- tmp/drivers/sound/btaudio.c Thu Oct 18 07:19:20 2001 +++ tmp2/drivers/sound/btaudio.c Thu Nov 22 18:55:26 2001 @@ -1051,14 +1051,14 @@ module_init(btaudio_init_module); module_exit(btaudio_cleanup_module); -MODULE_PARM(dsp1,"i"); -MODULE_PARM(dsp2,"i"); -MODULE_PARM(mixer,"i"); -MODULE_PARM(debug,"i"); -MODULE_PARM(irq_debug,"i"); -MODULE_PARM(digital,"i"); -MODULE_PARM(analog,"i"); -MODULE_PARM(rate,"i"); +PARAM(dsp1, int, 000); +PARAM(dsp2, int, 000); +PARAM(mixer, int, 000); +PARAM(debug, int, 000); +PARAM(irq_debug, int, 000); +PARAM(digital, int, 000); +PARAM(analog, int, 000); +PARAM(rate, int, 000); MODULE_DEVICE_TABLE(pci, btaudio_pci_tbl); MODULE_DESCRIPTION("bt878 audio dma driver"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/cmpci.c tmp2/drivers/sound/cmpci.c --- tmp/drivers/sound/cmpci.c Thu Nov 22 18:18:46 2001 +++ tmp2/drivers/sound/cmpci.c Thu Nov 22 18:55:26 2001 @@ -2830,14 +2830,14 @@ #else static int joystick; #endif -MODULE_PARM(mpuio, "i"); -MODULE_PARM(fmio, "i"); -MODULE_PARM(spdif_inverse, "i"); -MODULE_PARM(spdif_loop, "i"); -MODULE_PARM(speakers, "i"); -MODULE_PARM(use_line_as_rear, "i"); -MODULE_PARM(use_line_as_bass, "i"); -MODULE_PARM(joystick, "i"); +PARAM(mpuio, int, 000); +PARAM(fmio, int, 000); +PARAM(spdif_inverse, int, 000); +PARAM(spdif_loop, int, 000); +PARAM(speakers, int, 000); +PARAM(use_line_as_rear, int, 000); +PARAM(use_line_as_bass, int, 000); +PARAM(joystick, int, 000); MODULE_PARM_DESC(mpuio, "(0x330, 0x320, 0x310, 0x300) Base of MPU-401, 0 to disable"); MODULE_PARM_DESC(fmio, "(0x388, 0x3C8, 0x3E0) Base of OPL3, 0 to disable"); MODULE_PARM_DESC(spdif_inverse, "(1/0) Invert S/PDIF-in signal"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/cs4232.c tmp2/drivers/sound/cs4232.c --- tmp/drivers/sound/cs4232.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/cs4232.c Thu Nov 22 18:55:26 2001 @@ -331,23 +331,23 @@ MODULE_AUTHOR("Hannu Savolainen, Paul Barton-Davis"); MODULE_LICENSE("GPL"); -MODULE_PARM(io,"i"); +PARAM(io, int, 000); MODULE_PARM_DESC(io,"base I/O port for AD1848"); -MODULE_PARM(irq,"i"); +PARAM(irq, int, 000); MODULE_PARM_DESC(irq,"IRQ for AD1848 chip"); -MODULE_PARM(dma,"i"); +PARAM(dma, int, 000); MODULE_PARM_DESC(dma,"8 bit DMA for AD1848 chip"); -MODULE_PARM(dma2,"i"); +PARAM(dma2, int, 000); MODULE_PARM_DESC(dma2,"16 bit DMA for AD1848 chip"); -MODULE_PARM(mpuio,"i"); +PARAM(mpuio, int, 000); MODULE_PARM_DESC(mpuio,"MPU 401 base address"); -MODULE_PARM(mpuirq,"i"); +PARAM(mpuirq, int, 000); MODULE_PARM_DESC(mpuirq,"MPU 401 IRQ"); -MODULE_PARM(synthio,"i"); +PARAM(synthio, int, 000); MODULE_PARM_DESC(synthio,"Maui WaveTable base I/O port"); -MODULE_PARM(synthirq,"i"); +PARAM(synthirq, int, 000); MODULE_PARM_DESC(synthirq,"Maui WaveTable IRQ"); -MODULE_PARM(isapnp,"i"); +PARAM(isapnp, int, 000); MODULE_PARM_DESC(isapnp,"Enable ISAPnP probing (default 1)"); /* @@ -478,28 +478,3 @@ module_init(init_cs4232); module_exit(cleanup_cs4232); - -#ifndef MODULE -static int __init setup_cs4232(char *str) -{ - /* io, irq, dma, dma2 mpuio, mpuirq*/ - int ints[7]; - - /* If we have isapnp cards, no need for options */ - if (isapnp_probe_devs(isapnp_cs4232_list, cs4232_isapnp_probe) > 0) - return 1; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma2 = ints[4]; - mpuio = ints[5]; - mpuirq = ints[6]; - - return 1; -} - -__setup("cs4232=", setup_cs4232); -#endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/cs4281/cs4281m.c tmp2/drivers/sound/cs4281/cs4281m.c --- tmp/drivers/sound/cs4281/cs4281m.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/cs4281/cs4281m.c Thu Nov 22 18:55:26 2001 @@ -109,7 +109,7 @@ // rather than 64k as some of the games work more responsively. // log base 2( buff sz = 32k). static unsigned long defaultorder = 3; -MODULE_PARM(defaultorder, "i"); +PARAM(defaultorder, int, 000); // // Turn on/off debugging compilation by commenting out "#define CSDEBUG" @@ -157,8 +157,8 @@ #if CSDEBUG static unsigned long cs_debuglevel = 1; // levels range from 1-9 static unsigned long cs_debugmask = CS_INIT | CS_ERROR; // use CS_DBGOUT with various mask values -MODULE_PARM(cs_debuglevel, "i"); -MODULE_PARM(cs_debugmask, "i"); +PARAM(cs_debuglevel, int, 000); +PARAM(cs_debugmask, int, 000); #endif #define CS_TRUE 1 #define CS_FALSE 0 diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/cs46xx.c tmp2/drivers/sound/cs46xx.c --- tmp/drivers/sound/cs46xx.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/cs46xx.c Thu Nov 22 18:55:26 2001 @@ -177,24 +177,24 @@ #if CSDEBUG static unsigned long cs_debuglevel=1; /* levels range from 1-9 */ -MODULE_PARM(cs_debuglevel, "i"); +PARAM(cs_debuglevel, int, 000); static unsigned long cs_debugmask=CS_INIT | CS_ERROR; /* use CS_DBGOUT with various mask values */ -MODULE_PARM(cs_debugmask, "i"); +PARAM(cs_debugmask, int, 000); #endif static unsigned long hercules_egpio_disable=0; /* if non-zero set all EGPIO to 0 */ -MODULE_PARM(hercules_egpio_disable, "i"); +PARAM(hercules_egpio_disable, int, 000); static unsigned long initdelay=700; /* PM delay in millisecs */ -MODULE_PARM(initdelay, "i"); +PARAM(initdelay, int, 000); static unsigned long powerdown=-1; /* turn on/off powerdown processing in driver */ -MODULE_PARM(powerdown, "i"); +PARAM(powerdown, int, 000); #define DMABUF_DEFAULTORDER 3 static unsigned long defaultorder=DMABUF_DEFAULTORDER; -MODULE_PARM(defaultorder, "i"); +PARAM(defaultorder, int, 000); static int external_amp; -MODULE_PARM(external_amp, "i"); +PARAM(external_amp, int, 000); static int thinkpad; -MODULE_PARM(thinkpad, "i"); +PARAM(thinkpad, int, 000); /* * set the powerdown module parm to 0 to disable all diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/dmasound/dmasound_core.c tmp2/drivers/sound/dmasound/dmasound_core.c --- tmp/drivers/sound/dmasound/dmasound_core.c Tue Nov 6 11:41:37 2001 +++ tmp2/drivers/sound/dmasound/dmasound_core.c Thu Nov 22 18:55:26 2001 @@ -130,11 +130,11 @@ static unsigned int readBufSize = 32; /* in KB! */ #endif -MODULE_PARM(dmasound_catchRadius, "i"); -MODULE_PARM(numWriteBufs, "i"); -MODULE_PARM(writeBufSize, "i"); -MODULE_PARM(numReadBufs, "i"); -MODULE_PARM(readBufSize, "i"); +PARAM(dmasound_catchRadius, int, S_IRUGO); +PARAM(numWriteBufs, int, S_IRUGO); +PARAM(writeBufSize, int, S_IRUGO); +PARAM(numReadBufs, int, S_IRUGO); +PARAM(readBufSize, int, S_IRUGO); MODULE_LICENSE("GPL"); #ifdef MODULE @@ -1243,7 +1243,7 @@ #else /* !MODULE */ -static int __init dmasound_setup(char *str) +static int __init dmasound_setup(char *str, struct kernel_param *kp) { int ints[6]; @@ -1272,12 +1272,13 @@ break; default: printk("dmasound_setup: illegal number of arguments\n"); - return 0; + return -EINVAL; } - return 1; + return 0; } -__setup("dmasound=", dmasound_setup); +/* FIXME: Use PARAM_ARRAY */ +PARAM_CALL(dmasound, dmasound_setup, NULL); #endif /* !MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/es1370.c tmp2/drivers/sound/es1370.c --- tmp/drivers/sound/es1370.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/es1370.c Thu Nov 22 18:55:26 2001 @@ -2532,11 +2532,11 @@ static unsigned int devindex = 0; -MODULE_PARM(joystick, "1-" __MODULE_STRING(NR_DEVICE) "i"); +PARAM_ARRAY(joystick, joystick, int, 1, NR_DEVICE, 000); MODULE_PARM_DESC(joystick, "if 1 enables joystick interface (still need separate driver)"); -MODULE_PARM(lineout, "1-" __MODULE_STRING(NR_DEVICE) "i"); +PARAM_ARRAY(lineout, lineout, int, 1, NR_DEVICE, 000); MODULE_PARM_DESC(lineout, "if 1 the LINE input is converted to LINE out"); -MODULE_PARM(micbias, "1-" __MODULE_STRING(NR_DEVICE) "i"); +PARAM_ARRAY(micbias, micbias, int, 1, NR_DEVICE, 000); MODULE_PARM_DESC(micbias, "sets the +5V bias for an electret microphone"); MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu"); @@ -2755,30 +2755,3 @@ module_init(init_es1370); module_exit(cleanup_es1370); - -/* --------------------------------------------------------------------- */ - -#ifndef MODULE - -/* format is: es1370=[joystick[,lineout[,micbias]]] */ - -static int __init es1370_setup(char *str) -{ - static unsigned __initdata nr_dev = 0; - - if (nr_dev >= NR_DEVICE) - return 0; - - (void) - ( (get_option(&str,&joystick[nr_dev]) == 2) - && (get_option(&str,&lineout [nr_dev]) == 2) - && get_option(&str,&micbias [nr_dev]) - ); - - nr_dev++; - return 1; -} - -__setup("es1370=", es1370_setup); - -#endif /* MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/es1371.c tmp2/drivers/sound/es1371.c --- tmp/drivers/sound/es1371.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/es1371.c Thu Nov 22 18:55:26 2001 @@ -2746,13 +2746,13 @@ static unsigned int devindex = 0; static int amplifier = 0; -MODULE_PARM(joystick, "1-" __MODULE_STRING(NR_DEVICE) "i"); +PARAM_ARRAY(joystick, joystick, int, 1, NR_DEVICE, 000); MODULE_PARM_DESC(joystick, "sets address and enables joystick interface (still need separate driver)"); -MODULE_PARM(spdif, "1-" __MODULE_STRING(NR_DEVICE) "i"); +PARAM_ARRAY(spdif, spdif, int, 1, NR_DEVICE, 000); MODULE_PARM_DESC(spdif, "if 1 the output is in S/PDIF digital mode"); -MODULE_PARM(nomix, "1-" __MODULE_STRING(NR_DEVICE) "i"); +PARAM_ARRAY(nomix, nomix, int, 1, NR_DEVICE, 000); MODULE_PARM_DESC(nomix, "if 1 no analog audio is mixed to the digital output"); -MODULE_PARM(amplifier, "i"); +PARAM(amplifier, int, 000); MODULE_PARM_DESC(amplifier, "Set to 1 if the machine needs the amp control enabling (many laptops)"); MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu"); @@ -3060,25 +3060,3 @@ module_init(init_es1371); module_exit(cleanup_es1371); - -/* --------------------------------------------------------------------- */ - -#ifndef MODULE - -/* format is: es1371=[joystick] */ - -static int __init es1371_setup(char *str) -{ - static unsigned __initdata nr_dev = 0; - - if (nr_dev >= NR_DEVICE) - return 0; - if (get_option(&str, &joystick[nr_dev]) == 2) - (void)get_option(&str, &spdif[nr_dev]); - nr_dev++; - return 1; -} - -__setup("es1371=", es1371_setup); - -#endif /* MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/gus_card.c tmp2/drivers/sound/gus_card.c --- tmp/drivers/sound/gus_card.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/gus_card.c Thu Nov 22 18:55:26 2001 @@ -220,17 +220,17 @@ static int __initdata dma16 = -1; /* Set this for modules that need it */ static int __initdata type = 0; /* 1 for PnP */ -MODULE_PARM(io, "i"); -MODULE_PARM(irq, "i"); -MODULE_PARM(dma, "i"); -MODULE_PARM(dma16, "i"); -MODULE_PARM(type, "i"); +PARAM(io, int, 000); +PARAM(irq, int, 000); +PARAM(dma, int, 000); +PARAM(dma16, int, 000); +PARAM(type, int, 000); #ifdef CONFIG_SOUND_GUSMAX -MODULE_PARM(no_wave_dma, "i"); +PARAM(no_wave_dma, int, 000); #endif #ifdef CONFIG_SOUND_GUS16 -MODULE_PARM(db16, "i"); -MODULE_PARM(gus16, "i"); +PARAM(db16, int, 000); +PARAM(gus16, int, 000); #endif MODULE_LICENSE("GPL"); @@ -277,22 +277,3 @@ module_init(init_gus); module_exit(cleanup_gus); - -#ifndef MODULE -static int __init setup_gus(char *str) -{ - /* io, irq, dma, dma2 */ - int ints[5]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma16 = ints[4]; - - return 1; -} - -__setup("gus=", setup_gus); -#endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/i810_audio.c tmp2/drivers/sound/i810_audio.c --- tmp/drivers/sound/i810_audio.c Thu Nov 22 18:18:46 2001 +++ tmp2/drivers/sound/i810_audio.c Thu Nov 22 18:55:26 2001 @@ -2927,10 +2927,10 @@ MODULE_AUTHOR(""); MODULE_DESCRIPTION("Intel 810 audio support"); MODULE_LICENSE("GPL"); -MODULE_PARM(ftsodell, "i"); -MODULE_PARM(clocking, "i"); -MODULE_PARM(strict_clocking, "i"); -MODULE_PARM(spdif_locked, "i"); +PARAM(ftsodell, int, 000); +PARAM(clocking, int, 000); +PARAM(strict_clocking, int, 000); +PARAM(spdif_locked, int, 000); #define I810_MODULE_NAME "intel810_audio" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/ite8172.c tmp2/drivers/sound/ite8172.c --- tmp/drivers/sound/ite8172.c Tue Nov 6 11:41:38 2001 +++ tmp2/drivers/sound/ite8172.c Thu Nov 22 18:55:26 2001 @@ -1716,7 +1716,7 @@ static unsigned int devindex = 0; -MODULE_PARM(spdif, "1-" __MODULE_STRING(NR_DEVICE) "i"); +PARAM_ARRAY(spdif, spdif, int, 1, NR_DEVICE, 000); MODULE_PARM_DESC(spdif, "if 1 the S/PDIF digital output is enabled"); MODULE_AUTHOR("Monta Vista Software, stevel@mvista.com"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/mad16.c tmp2/drivers/sound/mad16.c --- tmp/drivers/sound/mad16.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/mad16.c Thu Nov 22 18:55:26 2001 @@ -881,19 +881,19 @@ static int __initdata opl4 = 0; static int __initdata joystick = 0; -MODULE_PARM(mpu_io, "i"); -MODULE_PARM(mpu_irq, "i"); -MODULE_PARM(io,"i"); -MODULE_PARM(dma,"i"); -MODULE_PARM(dma16,"i"); -MODULE_PARM(irq,"i"); -MODULE_PARM(cdtype,"i"); -MODULE_PARM(cdirq,"i"); -MODULE_PARM(cdport,"i"); -MODULE_PARM(cddma,"i"); -MODULE_PARM(opl4,"i"); -MODULE_PARM(joystick,"i"); -MODULE_PARM(debug,"i"); +PARAM(mpu_io, int, 000); +PARAM(mpu_irq, int, 000); +PARAM(io, int, 000); +PARAM(dma, int, 000); +PARAM(dma16, int, 000); +PARAM(irq, int, 000); +PARAM(cdtype, int, 000); +PARAM(cdirq, int, 000); +PARAM(cdport, int, 000); +PARAM(cddma, int, 000); +PARAM(opl4, int, 000); +PARAM(joystick, int, 000); +PARAM(debug, int, 000); static int __initdata dma_map[2][8] = { @@ -1050,25 +1050,4 @@ module_init(init_mad16); module_exit(cleanup_mad16); - -#ifndef MODULE -static int __init setup_mad16(char *str) -{ - /* io, irq */ - int ints[7]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma16 = ints[4]; - mpu_io = ints[5]; - mpu_irq = ints[6]; - - return 1; -} - -__setup("mad16=", setup_mad16); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/maestro.c tmp2/drivers/sound/maestro.c --- tmp/drivers/sound/maestro.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/maestro.c Thu Nov 22 18:55:26 2001 @@ -260,11 +260,11 @@ MODULE_LICENSE("GPL"); #ifdef M_DEBUG -MODULE_PARM(debug,"i"); +PARAM(debug, int, 000); #endif -MODULE_PARM(dsps_order,"i"); -MODULE_PARM(use_pm,"i"); -MODULE_PARM(clocking, "i"); +PARAM(dsps_order, int, 000); +PARAM(use_pm, int, 000); +PARAM(clocking, int, 000); /* --------------------------------------------------------------------- */ #define DRIVER_VERSION "0.15" diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/maestro3.c tmp2/drivers/sound/maestro3.c --- tmp/drivers/sound/maestro3.c Thu Nov 22 18:18:46 2001 +++ tmp2/drivers/sound/maestro3.c Thu Nov 22 18:55:26 2001 @@ -2908,9 +2908,9 @@ MODULE_LICENSE("GPL"); #ifdef M_DEBUG -MODULE_PARM(debug,"i"); +PARAM(debug, int, 000); #endif -MODULE_PARM(external_amp,"i"); +PARAM(external_amp, int, 000); static struct pci_driver m3_pci_driver = { name: "ess_m3_audio", diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/maui.c tmp2/drivers/sound/maui.c --- tmp/drivers/sound/maui.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/maui.c Thu Nov 22 18:55:26 2001 @@ -418,8 +418,8 @@ static int __initdata io = -1; static int __initdata irq = -1; -MODULE_PARM(io,"i"); -MODULE_PARM(irq,"i"); +PARAM(io, int, 000); +PARAM(irq, int, 000); /* * Install a Maui card. Needs mpu401 loaded already. @@ -457,21 +457,4 @@ module_init(init_maui); module_exit(cleanup_maui); - -#ifndef MODULE -static int __init setup_maui(char *str) -{ - /* io, irq */ - int ints[3]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - - return 1; -} - -__setup("maui=", setup_maui); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/mpu401.c tmp2/drivers/sound/mpu401.c --- tmp/drivers/sound/mpu401.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/mpu401.c Thu Nov 22 18:55:26 2001 @@ -1749,8 +1749,8 @@ static int __initdata io = -1; static int __initdata irq = -1; -MODULE_PARM(irq, "i"); -MODULE_PARM(io, "i"); +PARAM(irq, int, 000); +PARAM(io, int, 000); int __init init_mpu401(void) { @@ -1777,21 +1777,4 @@ module_init(init_mpu401); module_exit(cleanup_mpu401); - -#ifndef MODULE -static int __init setup_mpu401(char *str) -{ - /* io, irq */ - int ints[3]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - - return 1; -} - -__setup("mpu401=", setup_mpu401); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/msnd_pinnacle.c tmp2/drivers/sound/msnd_pinnacle.c --- tmp/drivers/sound/msnd_pinnacle.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/msnd_pinnacle.c Thu Nov 22 18:55:27 2001 @@ -1573,24 +1573,6 @@ MODULE_DESCRIPTION ("Turtle Beach " LONGNAME " Linux Driver"); MODULE_LICENSE("GPL"); -MODULE_PARM (io, "i"); -MODULE_PARM (irq, "i"); -MODULE_PARM (mem, "i"); -MODULE_PARM (write_ndelay, "i"); -MODULE_PARM (fifosize, "i"); -MODULE_PARM (calibrate_signal, "i"); -#ifndef MSND_CLASSIC -MODULE_PARM (digital, "i"); -MODULE_PARM (cfg, "i"); -MODULE_PARM (reset, "i"); -MODULE_PARM (mpu_io, "i"); -MODULE_PARM (mpu_irq, "i"); -MODULE_PARM (ide_io0, "i"); -MODULE_PARM (ide_io1, "i"); -MODULE_PARM (ide_irq, "i"); -MODULE_PARM (joystick_io, "i"); -#endif - static int io __initdata = -1; static int irq __initdata = -1; static int mem __initdata = -1; @@ -1892,3 +1874,22 @@ module_init(msnd_init); module_exit(msdn_cleanup); + +PARAM(io, int, 000); +PARAM(irq, int, 000); +PARAM(mem, int, 000); +PARAM(write_ndelay, int, 000); +PARAM(fifosize, int, 000); +PARAM(calibrate_signal, int, 000); +#ifndef MSND_CLASSIC +PARAM(digital, int, 000); +PARAM(cfg, int, 000); +PARAM(reset, int, 000); +PARAM(mpu_io, int, 000); +PARAM(mpu_irq, int, 000); +PARAM(ide_io0, int, 000); +PARAM(ide_io1, int, 000); +PARAM(ide_irq, int, 000); +PARAM(joystick_io, int, 000); +#endif + diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/nm256_audio.c tmp2/drivers/sound/nm256_audio.c --- tmp/drivers/sound/nm256_audio.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/nm256_audio.c Thu Nov 22 18:55:27 2001 @@ -1663,10 +1663,10 @@ remove:nm256_remove, }; -MODULE_PARM (usecache, "i"); -MODULE_PARM (buffertop, "i"); -MODULE_PARM (nm256_debug, "i"); -MODULE_PARM (force_load, "i"); +PARAM(usecache, int, 000); +PARAM(buffertop, int, 000); +PARAM(nm256_debug, int, 000); +PARAM(force_load, int, 000); static int __init do_init_nm256(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/opl3.c tmp2/drivers/sound/opl3.c --- tmp/drivers/sound/opl3.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/opl3.c Thu Nov 22 18:55:27 2001 @@ -1198,7 +1198,7 @@ static int io = -1; -MODULE_PARM(io, "i"); +PARAM(io, int, 000); static int __init init_opl3 (void) { @@ -1234,20 +1234,4 @@ module_init(init_opl3); module_exit(cleanup_opl3); - -#ifndef MODULE -static int __init setup_opl3(char *str) -{ - /* io */ - int ints[2]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - - return 1; -} - -__setup("opl3=", setup_opl3); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/opl3sa.c tmp2/drivers/sound/opl3sa.c --- tmp/drivers/sound/opl3sa.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/opl3sa.c Thu Nov 22 18:55:27 2001 @@ -273,12 +273,12 @@ static int __initdata mpu_io = -1; static int __initdata mpu_irq = -1; -MODULE_PARM(io,"i"); -MODULE_PARM(irq,"i"); -MODULE_PARM(dma,"i"); -MODULE_PARM(dma2,"i"); -MODULE_PARM(mpu_io,"i"); -MODULE_PARM(mpu_irq,"i"); +PARAM(io, int, 000); +PARAM(irq, int, 000); +PARAM(dma, int, 000); +PARAM(dma2, int, 000); +PARAM(mpu_io, int, 000); +PARAM(mpu_irq, int, 000); static int __init init_opl3sa(void) { @@ -313,25 +313,4 @@ module_init(init_opl3sa); module_exit(cleanup_opl3sa); - -#ifndef MODULE -static int __init setup_opl3sa(char *str) -{ - /* io, irq, dma, dma2, mpu_io, mpu_irq */ - int ints[7]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma2 = ints[4]; - mpu_io = ints[5]; - mpu_irq = ints[6]; - - return 1; -} - -__setup("opl3sa=", setup_opl3sa); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/opl3sa2.c tmp2/drivers/sound/opl3sa2.c --- tmp/drivers/sound/opl3sa2.c Fri Oct 12 02:43:30 2001 +++ tmp2/drivers/sound/opl3sa2.c Thu Nov 22 18:55:27 2001 @@ -167,35 +167,35 @@ MODULE_LICENSE("GPL"); -MODULE_PARM(io, "i"); +PARAM(io, int, 000); MODULE_PARM_DESC(io, "Set I/O base of OPL3-SA2 or SA3 card (usually 0x370. Address must be even and must be from 0x100 to 0xFFE)"); -MODULE_PARM(mss_io, "i"); +PARAM(mss_io, int, 000); MODULE_PARM_DESC(mss_io, "Set MSS (audio) I/O base (0x530, 0xE80, or other. Address must end in 0 or 4 and must be from 0x530 to 0xF48)"); -MODULE_PARM(mpu_io, "i"); +PARAM(mpu_io, int, 000); MODULE_PARM_DESC(mpu_io, "Set MIDI I/O base (0x330 or other. Address must be even and must be from 0x300 to 0x334)"); -MODULE_PARM(irq, "i"); +PARAM(irq, int, 000); MODULE_PARM_DESC(mss_irq, "Set MSS (audio) IRQ (5, 7, 9, 10, 11, 12)"); -MODULE_PARM(dma, "i"); +PARAM(dma, int, 000); MODULE_PARM_DESC(dma, "Set MSS (audio) first DMA channel (0, 1, 3)"); -MODULE_PARM(dma2, "i"); +PARAM(dma2, int, 000); MODULE_PARM_DESC(dma2, "Set MSS (audio) second DMA channel (0, 1, 3)"); -MODULE_PARM(ymode, "i"); +PARAM(ymode, int, 000); MODULE_PARM_DESC(ymode, "Set Yamaha 3D enhancement mode (0 = Desktop/Normal, 1 = Notebook PC (1), 2 = Notebook PC (2), 3 = Hi-Fi)"); -MODULE_PARM(loopback, "i"); +PARAM(loopback, int, 000); MODULE_PARM_DESC(loopback, "Set A/D input source. Useful for echo cancellation (0 = Mic Rch (default), 1 = Mono output loopback)"); #if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE -MODULE_PARM(isapnp, "i"); +PARAM(isapnp, int, 000); MODULE_PARM_DESC(isapnp, "When set to 0, ISA PnP support will be disabled"); -MODULE_PARM(multiple, "i"); +PARAM(multiple, int, 000); MODULE_PARM_DESC(multiple, "When set to 0, will not search for multiple cards"); #endif @@ -1053,32 +1053,3 @@ module_init(init_opl3sa2); module_exit(cleanup_opl3sa2); - -#ifndef MODULE -static int __init setup_opl3sa2(char *str) -{ - /* io, irq, dma, dma2,... */ -#if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE - int ints[11]; -#else - int ints[9]; -#endif - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma2 = ints[4]; - mss_io = ints[5]; - mpu_io = ints[6]; - ymode = ints[7]; - loopback = ints[8]; -#if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE - isapnp = ints[9]; - multiple = ints[10]; -#endif - return 1; -} - -__setup("opl3sa2=", setup_opl3sa2); -#endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/pas2_card.c tmp2/drivers/sound/pas2_card.c --- tmp/drivers/sound/pas2_card.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/pas2_card.c Thu Nov 22 18:55:27 2001 @@ -389,19 +389,19 @@ static int __initdata sb_dma = -1; static int __initdata sb_dma16 = -1; -MODULE_PARM(io,"i"); -MODULE_PARM(irq,"i"); -MODULE_PARM(dma,"i"); -MODULE_PARM(dma16,"i"); +PARAM(io, int, 000); +PARAM(irq, int, 000); +PARAM(dma, int, 000); +PARAM(dma16, int, 000); -MODULE_PARM(sb_io,"i"); -MODULE_PARM(sb_irq,"i"); -MODULE_PARM(sb_dma,"i"); -MODULE_PARM(sb_dma16,"i"); +PARAM(sb_io, int, 000); +PARAM(sb_irq, int, 000); +PARAM(sb_dma, int, 000); +PARAM(sb_dma16, int, 000); -MODULE_PARM(joystick,"i"); -MODULE_PARM(symphony,"i"); -MODULE_PARM(broken_bus_clock,"i"); +PARAM(joystick, int, 000); +PARAM(symphony, int, 000); +PARAM(broken_bus_clock, int, 000); MODULE_LICENSE("GPL"); @@ -438,27 +438,3 @@ module_init(init_pas2); module_exit(cleanup_pas2); - -#ifndef MODULE -static int __init setup_pas2(char *str) -{ - /* io, irq, dma, dma2, sb_io, sb_irq, sb_dma, sb_dma2 */ - int ints[9]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma16 = ints[4]; - - sb_io = ints[5]; - sb_irq = ints[6]; - sb_dma = ints[7]; - sb_dma16 = ints[8]; - - return 1; -} - -__setup("pas2=", setup_pas2); -#endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/pss.c tmp2/drivers/sound/pss.c --- tmp/drivers/sound/pss.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/pss.c Thu Nov 22 18:55:27 2001 @@ -117,9 +117,9 @@ /* If compiled into kernel, it enable or disable pss mixer */ #ifdef CONFIG_PSS_MIXER -static unsigned char pss_mixer = 1; +static int pss_mixer = 1; #else -static unsigned char pss_mixer = 0; +static int pss_mixer = 0; #endif @@ -1106,29 +1106,29 @@ static int pss_keep_settings = 1; /* Keep hardware settings at module exit */ static char *pss_firmware = "/etc/sound/pss_synth"; -MODULE_PARM(pss_io, "i"); +PARAM(pss_io, int, 000); MODULE_PARM_DESC(pss_io, "Set i/o base of PSS card (probably 0x220 or 0x240)"); -MODULE_PARM(mss_io, "i"); +PARAM(mss_io, int, 000); MODULE_PARM_DESC(mss_io, "Set WSS (audio) i/o base (0x530, 0x604, 0xE80, 0xF40, or other. Address must end in 0 or 4 and must be from 0x100 to 0xFF4)"); -MODULE_PARM(mss_irq, "i"); +PARAM(mss_irq, int, 000); MODULE_PARM_DESC(mss_irq, "Set WSS (audio) IRQ (3, 5, 7, 9, 10, 11, 12)"); -MODULE_PARM(mss_dma, "i"); +PARAM(mss_dma, int, 000); MODULE_PARM_DESC(mss_dma, "Set WSS (audio) DMA (0, 1, 3)"); -MODULE_PARM(mpu_io, "i"); +PARAM(mpu_io, int, 000); MODULE_PARM_DESC(mpu_io, "Set MIDI i/o base (0x330 or other. Address must be on 4 location boundaries and must be from 0x100 to 0xFFC)"); -MODULE_PARM(mpu_irq, "i"); +PARAM(mpu_irq, int, 000); MODULE_PARM_DESC(mpu_irq, "Set MIDI IRQ (3, 5, 7, 9, 10, 11, 12)"); -MODULE_PARM(pss_cdrom_port, "i"); +PARAM(pss_cdrom_port, int, 000); MODULE_PARM_DESC(pss_cdrom_port, "Set the PSS CDROM port i/o base (0x340 or other)"); -MODULE_PARM(pss_enable_joystick, "i"); +PARAM(pss_enable_joystick, int, 000); MODULE_PARM_DESC(pss_enable_joystick, "Enables the PSS joystick port (1 to enable, 0 to disable)"); -MODULE_PARM(pss_no_sound, "i"); +PARAM(pss_no_sound, int, 000); MODULE_PARM_DESC(pss_no_sound, "Configure sound compoents (0 - no, 1 - yes)"); -MODULE_PARM(pss_keep_settings, "i"); +PARAM(pss_keep_settings, int, 000); MODULE_PARM_DESC(pss_keep_settings, "Keep hardware setting at driver unloading (0 - no, 1 - yes)"); -MODULE_PARM(pss_firmware, "s"); +PARAM(pss_firmware, charp, 000); MODULE_PARM_DESC(pss_firmware, "Location of the firmware file (default - /etc/sound/pss_synth)"); -MODULE_PARM(pss_mixer, "b"); +PARAM(pss_mixer, bool, 000); MODULE_PARM_DESC(pss_mixer, "Enable (1) or disable (0) PSS mixer (controlling of output volume, bass, treble, synth volume). The mixer is not available on all PSS cards."); MODULE_AUTHOR("Hannu Savolainen, Vladimir Michl"); MODULE_DESCRIPTION("Module for PSS sound cards (based on AD1848, ADSP-2115 and ESC614). This module includes control of output amplifier and synth volume of the Beethoven ADSP-16 card (this may work with other PSS cards).\n"); @@ -1215,24 +1215,3 @@ module_init(init_pss); module_exit(cleanup_pss); - -#ifndef MODULE -static int __init setup_pss(char *str) -{ - /* io, mss_io, mss_irq, mss_dma, mpu_io, mpu_irq */ - int ints[7]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - pss_io = ints[1]; - mss_io = ints[2]; - mss_irq = ints[3]; - mss_dma = ints[4]; - mpu_io = ints[5]; - mpu_irq = ints[6]; - - return 1; -} - -__setup("pss=", setup_pss); -#endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/rme96xx.c tmp2/drivers/sound/rme96xx.c --- tmp/drivers/sound/rme96xx.c Tue Nov 6 11:41:38 2001 +++ tmp2/drivers/sound/rme96xx.c Thu Nov 22 18:55:27 2001 @@ -48,7 +48,7 @@ #define NR_DEVICE 2 static int devices = 1; -MODULE_PARM(devices, "1-" __MODULE_STRING(NR_DEVICE) "i"); +PARAM_ARRAY(devices, devices, int, 1, NR_DEVICE, 000); MODULE_PARM_DESC(devices, "number of dsp devices allocated by the driver"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/sb_card.c tmp2/drivers/sound/sb_card.c --- tmp/drivers/sound/sb_card.c Fri Oct 12 02:43:30 2001 +++ tmp2/drivers/sound/sb_card.c Thu Nov 22 18:55:27 2001 @@ -216,23 +216,23 @@ MODULE_DESCRIPTION("Soundblaster driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(io, "i"); -MODULE_PARM(irq, "i"); -MODULE_PARM(dma, "i"); -MODULE_PARM(dma16, "i"); -MODULE_PARM(mpu_io, "i"); -MODULE_PARM(type, "i"); -MODULE_PARM(sm_games, "i"); -MODULE_PARM(esstype, "i"); -MODULE_PARM(acer, "i"); +PARAM(io, int, 000); +PARAM(irq, int, 000); +PARAM(dma, int, 000); +PARAM(dma16, int, 000); +PARAM(mpu_io, int, 000); +PARAM(type, int, 000); +PARAM(sm_games, int, 000); +PARAM(esstype, int, 000); +PARAM(acer, int, 000); #if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE -MODULE_PARM(isapnp, "i"); -MODULE_PARM(isapnpjump, "i"); -MODULE_PARM(multiple, "i"); -MODULE_PARM(pnplegacy, "i"); -MODULE_PARM(reverse, "i"); -MODULE_PARM(uart401, "i"); +PARAM(isapnp, int, 000); +PARAM(isapnpjump, int, 000); +PARAM(multiple, int, 000); +PARAM(pnplegacy, int, 000); +PARAM(reverse, int, 000); +PARAM(uart401, int, 000); MODULE_PARM_DESC(isapnp, "When set to 0, Plug & Play support will be disabled"); MODULE_PARM_DESC(isapnpjump, "Jumps to a specific slot in the driver's PnP table. Use the source, Luke."); MODULE_PARM_DESC(multiple, "When set to 0, will not search for multiple cards"); @@ -1010,21 +1010,3 @@ module_init(init_sb); module_exit(cleanup_sb); - -#ifndef MODULE -static int __init setup_sb(char *str) -{ - /* io, irq, dma, dma2 - just the basics */ - int ints[5]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma16 = ints[4]; - - return 1; -} -__setup("sb=", setup_sb); -#endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/sgalaxy.c tmp2/drivers/sound/sgalaxy.c --- tmp/drivers/sound/sgalaxy.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/sgalaxy.c Thu Nov 22 18:55:27 2001 @@ -141,11 +141,11 @@ static int __initdata dma2 = -1; static int __initdata sgbase = -1; -MODULE_PARM(io,"i"); -MODULE_PARM(irq,"i"); -MODULE_PARM(dma,"i"); -MODULE_PARM(dma2,"i"); -MODULE_PARM(sgbase,"i"); +PARAM(io, int, 000); +PARAM(irq, int, 000); +PARAM(dma, int, 000); +PARAM(dma2, int, 000); +PARAM(sgbase, int, 000); static int __init init_sgalaxy(void) { @@ -175,23 +175,4 @@ module_init(init_sgalaxy); module_exit(cleanup_sgalaxy); - -#ifndef MODULE -static int __init setup_sgalaxy(char *str) -{ - /* io, irq, dma, dma2, sgbase */ - int ints[6]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma2 = ints[4]; - sgbase = ints[5]; - - return 1; -} - -__setup("sgalaxy=", setup_sgalaxy); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/sonicvibes.c tmp2/drivers/sound/sonicvibes.c --- tmp/drivers/sound/sonicvibes.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/sonicvibes.c Thu Nov 22 18:55:27 2001 @@ -2449,10 +2449,10 @@ static unsigned int devindex = 0; -MODULE_PARM(reverb, "1-" __MODULE_STRING(NR_DEVICE) "i"); +PARAM_ARRAY(reverb, reverb, int, 1, NR_DEVICE, 000); MODULE_PARM_DESC(reverb, "if 1 enables the reverb circuitry. NOTE: your card must have the reverb RAM"); #if 0 -MODULE_PARM(wavetable, "1-" __MODULE_STRING(NR_DEVICE) "i"); +PARAM_ARRAY(wavetable, wavetable, int, 1, NR_DEVICE, 000); MODULE_PARM_DESC(wavetable, "if 1 the wavetable synth is enabled"); #endif @@ -2738,30 +2738,3 @@ module_init(init_sonicvibes); module_exit(cleanup_sonicvibes); - -/* --------------------------------------------------------------------- */ - -#ifndef MODULE - -/* format is: sonicvibes=[reverb] sonicvibesdmaio=dmaioaddr */ - -static int __init sonicvibes_setup(char *str) -{ - static unsigned __initdata nr_dev = 0; - - if (nr_dev >= NR_DEVICE) - return 0; -#if 0 - if (get_option(&str, &reverb[nr_dev]) == 2) - (void)get_option(&str, &wavetable[nr_dev]); -#else - (void)get_option(&str, &reverb[nr_dev]); -#endif - - nr_dev++; - return 1; -} - -__setup("sonicvibes=", sonicvibes_setup); - -#endif /* MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/soundcard.c tmp2/drivers/sound/soundcard.c --- tmp/drivers/sound/soundcard.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/soundcard.c Thu Nov 22 18:55:27 2001 @@ -582,8 +582,8 @@ static int dmabuf = 0; static int dmabug = 0; -MODULE_PARM(dmabuf, "i"); -MODULE_PARM(dmabug, "i"); +PARAM(dmabuf, int, 000); +PARAM(dmabug, int, 000); static int __init oss_init(void) { @@ -621,8 +621,10 @@ { int i; +#if 0 /* Why not just panic? --RR */ if (MOD_IN_USE) return; +#endif soundcard_register_devfs (0); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/sscape.c tmp2/drivers/sound/sscape.c --- tmp/drivers/sound/sscape.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/sscape.c Thu Nov 22 18:55:27 2001 @@ -1444,13 +1444,13 @@ static int __initdata mpu_irq = -1; static int __initdata mpu_io = -1; -MODULE_PARM(dma, "i"); -MODULE_PARM(irq, "i"); -MODULE_PARM(io, "i"); -MODULE_PARM(spea, "i"); /* spea=0/1 set the old_hardware */ -MODULE_PARM(mpu_irq, "i"); -MODULE_PARM(mpu_io, "i"); -MODULE_PARM(mss, "i"); +PARAM(dma, int, 000); +PARAM(irq, int, 000); +PARAM(io, int, 000); +PARAM(spea, int, 000); /* spea=0/1 set the old_hardware */ +PARAM(mpu_irq, int, 000); +PARAM(mpu_io, int, 000); +PARAM(mss, int, 000); static int __init init_sscape(void) { @@ -1508,24 +1508,4 @@ module_init(init_sscape); module_exit(cleanup_sscape); - -#ifndef MODULE -static int __init setup_sscape(char *str) -{ - /* io, irq, dma, mpu_io, mpu_irq */ - int ints[6]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - mpu_io = ints[4]; - mpu_irq = ints[5]; - - return 1; -} - -__setup("sscape=", setup_sscape); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/trix.c tmp2/drivers/sound/trix.c --- tmp/drivers/sound/trix.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/trix.c Thu Nov 22 18:55:29 2001 @@ -439,16 +439,16 @@ static int __initdata mpu_io = -1; static int __initdata mpu_irq = -1; -MODULE_PARM(io,"i"); -MODULE_PARM(irq,"i"); -MODULE_PARM(dma,"i"); -MODULE_PARM(dma2,"i"); -MODULE_PARM(sb_io,"i"); -MODULE_PARM(sb_dma,"i"); -MODULE_PARM(sb_irq,"i"); -MODULE_PARM(mpu_io,"i"); -MODULE_PARM(mpu_irq,"i"); -MODULE_PARM(joystick, "i"); +PARAM(io, int, 000); +PARAM(irq, int, 000); +PARAM(dma, int, 000); +PARAM(dma2, int, 000); +PARAM(sb_io, int, 000); +PARAM(sb_dma, int, 000); +PARAM(sb_irq, int, 000); +PARAM(mpu_io, int, 000); +PARAM(mpu_irq, int, 000); +PARAM(joystick, int, 000); static int __init init_trix(void) { @@ -519,28 +519,4 @@ module_init(init_trix); module_exit(cleanup_trix); - -#ifndef MODULE -static int __init setup_trix (char *str) -{ - /* io, irq, dma, dma2, sb_io, sb_irq, sb_dma, mpu_io, mpu_irq */ - int ints[9]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma2 = ints[4]; - sb_io = ints[5]; - sb_irq = ints[6]; - sb_dma = ints[6]; - mpu_io = ints[7]; - mpu_irq = ints[8]; - - return 1; -} - -__setup("trix=", setup_trix); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/uart401.c tmp2/drivers/sound/uart401.c --- tmp/drivers/sound/uart401.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/uart401.c Thu Nov 22 18:55:29 2001 @@ -433,9 +433,8 @@ static int __initdata io = -1; static int __initdata irq = -1; -MODULE_PARM(io, "i"); -MODULE_PARM(irq, "i"); - +PARAM(io, int, 000); +PARAM(irq, int, 000); static int __init init_uart401(void) { @@ -462,20 +461,4 @@ module_init(init_uart401); module_exit(cleanup_uart401); -#ifndef MODULE -static int __init setup_uart401(char *str) -{ - /* io, irq */ - int ints[3]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - - return 1; -} - -__setup("uart401=", setup_uart401); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/uart6850.c tmp2/drivers/sound/uart6850.c --- tmp/drivers/sound/uart6850.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/uart6850.c Thu Nov 22 18:55:29 2001 @@ -318,8 +318,8 @@ static int __initdata io = -1; static int __initdata irq = -1; -MODULE_PARM(io,"i"); -MODULE_PARM(irq,"i"); +PARAM(io, int, 000); +PARAM(irq, int, 000); static int __init init_uart6850(void) { @@ -345,20 +345,4 @@ module_init(init_uart6850); module_exit(cleanup_uart6850); - -#ifndef MODULE -static int __init setup_uart6850(char *str) -{ - /* io, irq */ - int ints[3]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - - return 1; -} -__setup("uart6850=", setup_uart6850); -#endif MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/waveartist.c tmp2/drivers/sound/waveartist.c --- tmp/drivers/sound/waveartist.c Tue Nov 6 11:41:38 2001 +++ tmp2/drivers/sound/waveartist.c Thu Nov 22 18:55:29 2001 @@ -2007,27 +2007,9 @@ module_init(init_waveartist); module_exit(cleanup_waveartist); -#ifndef MODULE -static int __init setup_waveartist(char *str) -{ - /* io, irq, dma, dma2 */ - int ints[5]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma2 = ints[4]; - - return 1; -} -__setup("waveartist=", setup_waveartist); -#endif - MODULE_DESCRIPTION("Rockwell WaveArtist RWA-010 sound driver"); -MODULE_PARM(io, "i"); /* IO base */ -MODULE_PARM(irq, "i"); /* IRQ */ -MODULE_PARM(dma, "i"); /* DMA */ -MODULE_PARM(dma2, "i"); /* DMA2 */ +PARAM(io, int, 000); /* IO base */ +PARAM(irq, int, 000); /* IRQ */ +PARAM(dma, int, 000); /* DMA */ +PARAM(dma2, int, 000); /* DMA2 */ MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/wavfront.c tmp2/drivers/sound/wavfront.c --- tmp/drivers/sound/wavfront.c Mon Oct 1 05:26:08 2001 +++ tmp2/drivers/sound/wavfront.c Thu Nov 22 18:55:29 2001 @@ -199,16 +199,16 @@ start running. */ -MODULE_PARM(wf_raw,"i"); -MODULE_PARM(fx_raw,"i"); -MODULE_PARM(debug_default,"i"); -MODULE_PARM(wait_polls,"i"); -MODULE_PARM(sleep_length,"i"); -MODULE_PARM(sleep_tries,"i"); -MODULE_PARM(ospath,"s"); -MODULE_PARM(reset_time,"i"); -MODULE_PARM(ramcheck_time,"i"); -MODULE_PARM(osrun_time,"i"); +PARAM(wf_raw, int, 000); +PARAM(fx_raw, int, 000); +PARAM(debug_default, int, 000); +PARAM(wait_polls, int, 000); +PARAM(sleep_length, int, 000); +PARAM(sleep_tries, int, 000); +PARAM(ospath, charp, 000); +PARAM(reset_time, int, 000); +PARAM(ramcheck_time, int, 000); +PARAM(osrun_time, int, 000); /***************************************************************************/ @@ -3487,8 +3487,8 @@ MODULE_AUTHOR ("Paul Barton-Davis "); MODULE_DESCRIPTION ("Turtle Beach WaveFront Linux Driver"); MODULE_LICENSE("GPL"); -MODULE_PARM (io,"i"); -MODULE_PARM (irq,"i"); +PARAM(io, int, 000); +PARAM(irq, int, 000); static int __init init_wavfront (void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/sound/ymfpci.c tmp2/drivers/sound/ymfpci.c --- tmp/drivers/sound/ymfpci.c Thu Nov 22 18:18:46 2001 +++ tmp2/drivers/sound/ymfpci.c Thu Nov 22 18:55:29 2001 @@ -2388,8 +2388,8 @@ # ifdef MODULE static int mpu_io = 0; static int synth_io = 0; -MODULE_PARM(mpu_io, "i"); -MODULE_PARM(synth_io, "i"); +PARAM(mpu_io, int, 000); +PARAM(synth_io, int, 000); # else static int mpu_io = 0x330; static int synth_io = 0x388; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/telephony/ixj.c tmp2/drivers/telephony/ixj.c --- tmp/drivers/telephony/ixj.c Tue Nov 6 11:41:38 2001 +++ tmp2/drivers/telephony/ixj.c Thu Nov 22 18:55:29 2001 @@ -282,7 +282,7 @@ static int hertz = HZ; static int samplerate = 100; -MODULE_PARM(ixjdebug, "i"); +PARAM(ixjdebug, int, 000); /************************************************************************ * @@ -7685,8 +7685,8 @@ 0, }; -MODULE_PARM(dspio, "1-" __MODULE_STRING(IXJMAX) "i"); -MODULE_PARM(xio, "1-" __MODULE_STRING(IXJMAX) "i"); +PARAM_ARRAY(dspio, dspio, int, 1, IXJMAX, 000); +PARAM_ARRAY(xio, xio, int, 1, IXJMAX, 000); MODULE_DESCRIPTION("Quicknet VoIP Telephony card module - www.quicknet.net"); MODULE_AUTHOR("Ed Okerson "); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/telephony/ixj_pcmcia.c tmp2/drivers/telephony/ixj_pcmcia.c --- tmp/drivers/telephony/ixj_pcmcia.c Sat Sep 8 02:28:37 2001 +++ tmp2/drivers/telephony/ixj_pcmcia.c Thu Nov 22 18:55:29 2001 @@ -23,7 +23,7 @@ #ifdef PCMCIA_DEBUG static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); +PARAM(pc_debug, int, 000); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) #else #define DEBUG(n, args...) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/CDCEther.c tmp2/drivers/usb/CDCEther.c --- tmp/drivers/usb/CDCEther.c Sat Oct 6 05:06:08 2001 +++ tmp2/drivers/usb/CDCEther.c Thu Nov 22 18:55:29 2001 @@ -1336,7 +1336,7 @@ MODULE_DESCRIPTION("USB CDC Ethernet driver"); MODULE_LICENSE("GPL"); -MODULE_PARM (multicast_filter_limit, "i"); +PARAM(multicast_filter_limit, int, 000); MODULE_PARM_DESC (multicast_filter_limit, "CDCEther maximum number of filtered multicast addresses"); MODULE_DEVICE_TABLE (usb, CDCEther_ids); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/dabusb.c tmp2/drivers/usb/dabusb.c --- tmp/drivers/usb/dabusb.c Sat Sep 15 07:04:07 2001 +++ tmp2/drivers/usb/dabusb.c Thu Nov 22 18:55:29 2001 @@ -850,7 +850,7 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM (buffers, "i"); +PARAM(buffers, int, 000); MODULE_PARM_DESC (buffers, "Number of buffers (default=256)"); module_init (dabusb_init); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/dsbr100.c tmp2/drivers/usb/dsbr100.c --- tmp/drivers/usb/dsbr100.c Wed Oct 10 08:15:02 2001 +++ tmp2/drivers/usb/dsbr100.c Thu Nov 22 18:55:29 2001 @@ -87,7 +87,7 @@ static void usb_dsbr100_close(struct video_device *dev); static int radio_nr = -1; -MODULE_PARM(radio_nr, "i"); +PARAM(radio_nr, int, 000); typedef struct { struct urb readurb,writeurb; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/ibmcam.c tmp2/drivers/usb/ibmcam.c --- tmp/drivers/usb/ibmcam.c Sat Oct 6 05:04:51 2001 +++ tmp2/drivers/usb/ibmcam.c Thu Nov 22 18:55:29 2001 @@ -134,38 +134,44 @@ /* Settings for camera model 3 */ static int init_model3_input = 0; -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug level: 0-9 (default=0)"); -MODULE_PARM(flags, "i"); -MODULE_PARM_DESC(flags, "Bitfield: 0=VIDIOCSYNC, 1=B/W, 2=show hints, 3=show stats, 4=test pattern, 5=separate frames, 6=clean frames"); -MODULE_PARM(framerate, "i"); +PARAM(flags, int, 000); +MODULE_PARM_DESC(flags, "Bitfield: 0=VIDIOCSYNC, 1=B/W, 2=show hints, 3=show stats, 4=test pattern, 5=seperate frames, 6=clean frames"); +PARAM(framerate, int, 000); MODULE_PARM_DESC(framerate, "Framerate setting: 0=slowest, 6=fastest (default=2)"); -MODULE_PARM(lighting, "i"); +PARAM(lighting, int, 000); MODULE_PARM_DESC(lighting, "Photosensitivity: 0=bright, 1=medium (default), 2=low light"); -MODULE_PARM(sharpness, "i"); +PARAM(sharpness, int, 000); MODULE_PARM_DESC(sharpness, "Model1 noise reduction: 0=smooth, 6=sharp (default=4)"); -MODULE_PARM(size, "i"); -MODULE_PARM_DESC(size, "Image size: 0=128x96 1=160x120 2=176x144 3=320x240 4=352x240 5=352x288 6=640x480 (default=5)"); -MODULE_PARM(init_brightness, "i"); +#if 0 /* Where is this? --RR */ +PARAM(videosize, int, 000); +MODULE_PARM_DESC(videosize, "Image size: 0=128x96, 1=176x144, 2=352x288, 3=320x240, 4=352x240 (default=1)"); +#endif +PARAM(init_brightness, int, 000); MODULE_PARM_DESC(init_brightness, "Brightness preconfiguration: 0-255 (default=128)"); -MODULE_PARM(init_contrast, "i"); +PARAM(init_contrast, int, 000); MODULE_PARM_DESC(init_contrast, "Contrast preconfiguration: 0-255 (default=192)"); -MODULE_PARM(init_color, "i"); -MODULE_PARM_DESC(init_color, "Color preconfiguration: 0-255 (default=128)"); -MODULE_PARM(init_hue, "i"); +PARAM(init_color, int, 000); +MODULE_PARM_DESC(init_color, "Dolor preconfiguration: 0-255 (default=128)"); +PARAM(init_hue, int, 000); MODULE_PARM_DESC(init_hue, "Hue preconfiguration: 0-255 (default=128)"); -MODULE_PARM(hue_correction, "i"); +PARAM(hue_correction, int, 000); MODULE_PARM_DESC(hue_correction, "YUV colorspace regulation: 0-255 (default=128)"); -MODULE_PARM(init_model2_rg2, "i"); +#if 0 /* Where is this? --RR */ +PARAM(init_model2_rg, int, 000); +MODULE_PARM_DESC(init_model2_rg, "Model2 preconfiguration: 0-255 (default=112)"); +#endif +PARAM(init_model2_rg2, int, 000); MODULE_PARM_DESC(init_model2_rg2, "Model2 preconfiguration: 0-255 (default=47)"); -MODULE_PARM(init_model2_sat, "i"); +PARAM(init_model2_sat, int, 000); MODULE_PARM_DESC(init_model2_sat, "Model2 preconfiguration: 0-255 (default=52)"); -MODULE_PARM(init_model2_yb, "i"); +PARAM(init_model2_yb, int, 000); MODULE_PARM_DESC(init_model2_yb, "Model2 preconfiguration: 0-255 (default=160)"); /* 01.01.08 - Added for RCA video in support -LO */ -MODULE_PARM(init_model3_input, "i"); +PARAM(init_model3_input, int, 000); MODULE_PARM_DESC(init_model3_input, "Model3 input: 0=CCD 1=RCA"); MODULE_AUTHOR ("Dmitri"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/ov511.c tmp2/drivers/usb/ov511.c --- tmp/drivers/usb/ov511.c Sat Sep 15 07:04:07 2001 +++ tmp2/drivers/usb/ov511.c Thu Nov 22 18:55:29 2001 @@ -122,37 +122,37 @@ /* Dump raw pixel data, in one of 3 formats. See ov511_dumppix() for details. */ static int dumppix = 0; -MODULE_PARM(autoadjust, "i"); +PARAM(autoadjust, int, 000); MODULE_PARM_DESC(autoadjust, "CCD dynamically changes exposure"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug level: 0=none, 1=init/detection, 2=warning, 3=config/control, 4=function call, 5=max"); -MODULE_PARM(fix_rgb_offset, "i"); +PARAM(fix_rgb_offset, int, 000); MODULE_PARM_DESC(fix_rgb_offset, "Fix vertical misalignment of red and blue at 640x480"); -MODULE_PARM(snapshot, "i"); +PARAM(snapshot, int, 000); MODULE_PARM_DESC(snapshot, "Enable snapshot mode"); -MODULE_PARM(sensor, "i"); +PARAM(sensor, int, 000); MODULE_PARM_DESC(sensor, "Override sensor detection"); -MODULE_PARM(i2c_detect_tries, "i"); +PARAM(i2c_detect_tries, int, 000); MODULE_PARM_DESC(i2c_detect_tries, "Number of tries to detect sensor"); -MODULE_PARM(aperture, "i"); +PARAM(aperture, int, 000); MODULE_PARM_DESC(aperture, "Read the OV7610/7620 specs"); -MODULE_PARM(force_rgb, "i"); +PARAM(force_rgb, int, 000); MODULE_PARM_DESC(force_rgb, "Read RGB instead of BGR"); -MODULE_PARM(buf_timeout, "i"); +PARAM(buf_timeout, int, 000); MODULE_PARM_DESC(buf_timeout, "Number of seconds before buffer deallocation"); -MODULE_PARM(cams, "i"); +PARAM(cams, int, 000); MODULE_PARM_DESC(cams, "Number of simultaneous cameras"); -MODULE_PARM(retry_sync, "i"); +PARAM(retry_sync, int, 000); MODULE_PARM_DESC(retry_sync, "Prevent apps from timing out"); -MODULE_PARM(compress, "i"); +PARAM(compress, int, 000); MODULE_PARM_DESC(compress, "Turn on compression (not functional yet)"); -MODULE_PARM(testpat, "i"); +PARAM(testpat, int, 000); MODULE_PARM_DESC(testpat, "Replace image with vertical bar testpattern (only partially working)"); -MODULE_PARM(sensor_gbr, "i"); +PARAM(sensor_gbr, int, 000); MODULE_PARM_DESC(sensor_gbr, "Make sensor output GBR422 rather than YUV420"); -MODULE_PARM(dumppix, "i"); +PARAM(dumppix, int, 000); MODULE_PARM_DESC(dumppix, "Dump raw pixel data, in one of 3 formats. See ov511_dumppix() for details"); -MODULE_PARM(video_nr,"i"); +PARAM(video_nr, int, 000); MODULE_AUTHOR( DRIVER_AUTHOR ); MODULE_DESCRIPTION( DRIVER_DESC ); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/pegasus.c tmp2/drivers/usb/pegasus.c --- tmp/drivers/usb/pegasus.c Sat Sep 15 07:04:07 2001 +++ tmp2/drivers/usb/pegasus.c Thu Nov 22 18:55:29 2001 @@ -84,8 +84,8 @@ MODULE_AUTHOR( DRIVER_AUTHOR ); MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(loopback, "i"); -MODULE_PARM(mii_mode, "i"); +PARAM(loopback, int, 000); +PARAM(mii_mode, int, 000); MODULE_PARM_DESC(loopback, "Enable MAC loopback mode (bit 0)"); MODULE_PARM_DESC(mii_mode, "Enable HomePNA mode (bit 0),default=MII mode = 0"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/pwc-if.c tmp2/drivers/usb/pwc-if.c --- tmp/drivers/usb/pwc-if.c Thu Oct 18 07:34:06 2001 +++ tmp2/drivers/usb/pwc-if.c Thu Nov 22 18:55:29 2001 @@ -1834,22 +1834,24 @@ static int compression = -1; static int leds[2] = { -1, -1 }; -MODULE_PARM(video_nr, "i"); -MODULE_PARM(size, "s"); +PARAM(video_nr, int, 000); +PARAM(size, charp, 000); MODULE_PARM_DESC(size, "Initial image size. One of sqcif, qsif, qcif, sif, cif, vga"); -MODULE_PARM(fps, "i"); +PARAM(fps, int, 000); MODULE_PARM_DESC(fps, "Initial frames per second. Varies with model, useful range 5-30"); -MODULE_PARM(fbufs, "i"); +PARAM(palette, charp, 000); +MODULE_PARM_DESC(palette, "Initial colour format of images. One of yuv420, yuv420p"); +PARAM(fbufs, int, 000); MODULE_PARM_DESC(fbufs, "Number of internal frame buffers to reserve"); -MODULE_PARM(mbufs, "i"); +PARAM(mbufs, int, 000); MODULE_PARM_DESC(mbufs, "Number of external (mmap()ed) image buffers"); -MODULE_PARM(trace, "i"); +PARAM(trace, int, 000); MODULE_PARM_DESC(trace, "For debugging purposes"); -MODULE_PARM(power_save, "i"); +PARAM(power_save, int, 000); MODULE_PARM_DESC(power_save, "Turn power save feature in camera on or off"); -MODULE_PARM(compression, "i"); +PARAM(compression, int, 000); MODULE_PARM_DESC(compression, "Preferred compression quality. Range 0 (uncompressed) to 3 (high compression)"); -MODULE_PARM(leds, "2i"); +PARAM_ARRAY(leds, leds, int, 2, 2, 000); MODULE_PARM_DESC(leds, "LED on,off time in milliseconds"); MODULE_DESCRIPTION("Philips USB webcam driver"); MODULE_AUTHOR("Nemosoft Unv. "); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/scanner.h tmp2/drivers/usb/scanner.h --- tmp/drivers/usb/scanner.h Wed Nov 21 15:10:28 2001 +++ tmp2/drivers/usb/scanner.h Thu Nov 22 18:55:29 2001 @@ -52,13 +52,13 @@ MODULE_DESCRIPTION(DRIVER_DESC" "DRIVER_VERSION); MODULE_LICENSE("GPL"); -MODULE_PARM(vendor, "i"); +PARAM(vendor, int, 000); MODULE_PARM_DESC(vendor, "User specified USB idVendor"); -MODULE_PARM(product, "i"); +PARAM(product, int, 000); MODULE_PARM_DESC(product, "User specified USB idProduct"); -MODULE_PARM(read_timeout, "i"); +PARAM(read_timeout, int, 000); MODULE_PARM_DESC(read_timeout, "User specified read timeout in seconds"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/se401.c tmp2/drivers/usb/se401.c --- tmp/drivers/usb/se401.c Sat Sep 15 07:27:10 2001 +++ tmp2/drivers/usb/se401.c Thu Nov 22 18:55:29 2001 @@ -67,9 +67,9 @@ MODULE_AUTHOR("Jeroen Vreeken "); MODULE_DESCRIPTION("SE401 USB Camera Driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(flickerless, "i"); +PARAM(flickerless, int, 000); MODULE_PARM_DESC(flickerless, "Net frequency to adjust exposure time to (0/50/60)"); -MODULE_PARM(video_nr, "i"); +PARAM(video_nr, int, 000); EXPORT_NO_SYMBOLS; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/belkin_sa.c tmp2/drivers/usb/serial/belkin_sa.c --- tmp/drivers/usb/serial/belkin_sa.c Thu Oct 11 16:42:47 2001 +++ tmp2/drivers/usb/serial/belkin_sa.c Thu Nov 22 18:55:29 2001 @@ -669,6 +669,6 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/cyberjack.c tmp2/drivers/usb/serial/cyberjack.c --- tmp/drivers/usb/serial/cyberjack.c Thu Oct 11 16:42:47 2001 +++ tmp2/drivers/usb/serial/cyberjack.c Thu Nov 22 18:55:29 2001 @@ -519,6 +519,6 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/digi_acceleport.c tmp2/drivers/usb/serial/digi_acceleport.c --- tmp/drivers/usb/serial/digi_acceleport.c Thu Oct 11 16:42:47 2001 +++ tmp2/drivers/usb/serial/digi_acceleport.c Thu Nov 22 18:55:29 2001 @@ -2096,6 +2096,6 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/empeg.c tmp2/drivers/usb/serial/empeg.c --- tmp/drivers/usb/serial/empeg.c Thu Oct 11 16:42:47 2001 +++ tmp2/drivers/usb/serial/empeg.c Thu Nov 22 18:55:29 2001 @@ -669,6 +669,6 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/ftdi_sio.c tmp2/drivers/usb/serial/ftdi_sio.c --- tmp/drivers/usb/serial/ftdi_sio.c Thu Nov 22 18:18:47 2001 +++ tmp2/drivers/usb/serial/ftdi_sio.c Thu Nov 22 18:55:29 2001 @@ -1007,6 +1007,6 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/io_edgeport.c tmp2/drivers/usb/serial/io_edgeport.c --- tmp/drivers/usb/serial/io_edgeport.c Thu Nov 22 18:18:47 2001 +++ tmp2/drivers/usb/serial/io_edgeport.c Thu Nov 22 18:55:29 2001 @@ -3085,6 +3085,6 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/ir-usb.c tmp2/drivers/usb/serial/ir-usb.c --- tmp/drivers/usb/serial/ir-usb.c Thu Nov 22 18:18:47 2001 +++ tmp2/drivers/usb/serial/ir-usb.c Thu Nov 22 18:55:30 2001 @@ -475,8 +475,8 @@ MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, bool, S_IWUSR|S_IRUGO); MODULE_PARM_DESC(debug, "Debug enabled or not"); -MODULE_PARM(buffer_size, "i"); +PARAM(buffer_size, int, 000); MODULE_PARM_DESC(buffer_size, "Size of the transfer buffers"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/keyspan.c tmp2/drivers/usb/serial/keyspan.c --- tmp/drivers/usb/serial/keyspan.c Thu Oct 11 16:42:47 2001 +++ tmp2/drivers/usb/serial/keyspan.c Thu Nov 22 18:55:30 2001 @@ -1803,6 +1803,6 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, S_IWUSR|S_IRUGO); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/keyspan_pda.c tmp2/drivers/usb/serial/keyspan_pda.c --- tmp/drivers/usb/serial/keyspan_pda.c Thu Oct 11 16:42:47 2001 +++ tmp2/drivers/usb/serial/keyspan_pda.c Thu Nov 22 18:55:30 2001 @@ -944,6 +944,6 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/mct_u232.c tmp2/drivers/usb/serial/mct_u232.c --- tmp/drivers/usb/serial/mct_u232.c Thu Nov 22 18:18:47 2001 +++ tmp2/drivers/usb/serial/mct_u232.c Thu Nov 22 18:55:30 2001 @@ -903,11 +903,11 @@ MODULE_LICENSE("GPL"); #ifdef FIX_WRITE_RETURN_CODE_PROBLEM -MODULE_PARM(write_blocking, "i"); +PARAM(write_blocking, int, 000); MODULE_PARM_DESC(write_blocking, "The write function will block to write out all data"); #endif -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/omninet.c tmp2/drivers/usb/serial/omninet.c --- tmp/drivers/usb/serial/omninet.c Thu Oct 11 16:42:47 2001 +++ tmp2/drivers/usb/serial/omninet.c Thu Nov 22 18:55:30 2001 @@ -423,6 +423,6 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/pl2303.c tmp2/drivers/usb/serial/pl2303.c --- tmp/drivers/usb/serial/pl2303.c Thu Oct 11 16:42:47 2001 +++ tmp2/drivers/usb/serial/pl2303.c Thu Nov 22 18:55:30 2001 @@ -748,6 +748,6 @@ MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/usbserial.c tmp2/drivers/usb/serial/usbserial.c --- tmp/drivers/usb/serial/usbserial.c Thu Oct 11 16:42:47 2001 +++ tmp2/drivers/usb/serial/usbserial.c Thu Nov 22 18:55:30 2001 @@ -1539,13 +1539,13 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, S_IWUSR|S_IRUGO); MODULE_PARM_DESC(debug, "Debug enabled or not"); #ifdef CONFIG_USB_SERIAL_GENERIC -MODULE_PARM(vendor, "h"); +PARAM(vendor, short, 000); MODULE_PARM_DESC(vendor, "User specified USB idVendor"); -MODULE_PARM(product, "h"); +PARAM(product, short, 000); MODULE_PARM_DESC(product, "User specified USB idProduct"); #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/visor.c tmp2/drivers/usb/serial/visor.c --- tmp/drivers/usb/serial/visor.c Thu Nov 22 18:18:47 2001 +++ tmp2/drivers/usb/serial/visor.c Thu Nov 22 18:55:30 2001 @@ -864,6 +864,6 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/serial/whiteheat.c tmp2/drivers/usb/serial/whiteheat.c --- tmp/drivers/usb/serial/whiteheat.c Sat Sep 15 07:04:07 2001 +++ tmp2/drivers/usb/serial/whiteheat.c Thu Nov 22 18:55:30 2001 @@ -679,6 +679,6 @@ MODULE_DESCRIPTION( DRIVER_DESC ); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/uhci.c tmp2/drivers/usb/uhci.c --- tmp/drivers/usb/uhci.c Thu Nov 22 18:18:47 2001 +++ tmp2/drivers/usb/uhci.c Thu Nov 22 18:55:30 2001 @@ -78,7 +78,7 @@ #else static int debug = 0; #endif -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug level"); static char *errbuf; #define ERRBUF_LEN (PAGE_SIZE * 8) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/ultracam.c tmp2/drivers/usb/ultracam.c --- tmp/drivers/usb/ultracam.c Thu Oct 18 07:34:06 2001 +++ tmp2/drivers/usb/ultracam.c Thu Nov 22 18:55:30 2001 @@ -64,9 +64,9 @@ static int init_hue = 128; static int hue_correction = 128; -MODULE_PARM(debug, "i"); +PARAM(debug, int, S_IWUSR|S_IRUGO); MODULE_PARM_DESC(debug, "Debug level: 0-9 (default=0)"); -MODULE_PARM(flags, "i"); +PARAM(flags, int, 000); MODULE_PARM_DESC(flags, "Bitfield: 0=VIDIOCSYNC, " "1=B/W, " @@ -75,22 +75,22 @@ "4=test pattern, " "5=separate frames, " "6=clean frames"); -MODULE_PARM(framerate, "i"); +PARAM(framerate, int, 000); MODULE_PARM_DESC(framerate, "Framerate setting: 0=slowest, 6=fastest (default=2)"); -MODULE_PARM(lighting, "i"); -MODULE_PARM_DESC(lighting, "Photosensitivity: 0=bright, 1=medium (default), 2=low light"); -MODULE_PARM(sharpness, "i"); -MODULE_PARM_DESC(sharpness, "Model1 noise reduction: 0=smooth, 6=sharp (default=4)"); +//PARAM(lighting, int, 000); +//MODULE_PARM_DESC(lighting, "Photosensitivity: 0=bright, 1=medium (default), 2=low light"); +//PARAM(sharpness, int, 000); +//MODULE_PARM_DESC(sharpness, "Model1 noise reduction: 0=smooth, 6=sharp (default=4)"); -MODULE_PARM(init_brightness, "i"); +PARAM(init_brightness, int, 000); MODULE_PARM_DESC(init_brightness, "Brightness preconfiguration: 0-255 (default=128)"); -MODULE_PARM(init_contrast, "i"); +PARAM(init_contrast, int, 000); MODULE_PARM_DESC(init_contrast, "Contrast preconfiguration: 0-255 (default=192)"); -MODULE_PARM(init_color, "i"); +PARAM(init_color, int, 000); MODULE_PARM_DESC(init_color, "Color preconfiguration: 0-255 (default=128)"); -MODULE_PARM(init_hue, "i"); +PARAM(init_hue, int, 000); MODULE_PARM_DESC(init_hue, "Hue preconfiguration: 0-255 (default=128)"); -MODULE_PARM(hue_correction, "i"); +PARAM(hue_correction, int, 000); MODULE_PARM_DESC(hue_correction, "YUV colorspace regulation: 0-255 (default=128)"); /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/usb-skeleton.c tmp2/drivers/usb/usb-skeleton.c --- tmp/drivers/usb/usb-skeleton.c Thu Nov 22 18:18:47 2001 +++ tmp2/drivers/usb/usb-skeleton.c Thu Nov 22 18:55:30 2001 @@ -65,7 +65,7 @@ #define DRIVER_DESC "USB Skeleton Driver" /* Module paramaters */ -MODULE_PARM(debug, "i"); +PARAM(debug, int, 000); MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/usb/usbvideo.c tmp2/drivers/usb/usbvideo.c --- tmp/drivers/usb/usbvideo.c Thu Oct 11 16:42:46 2001 +++ tmp2/drivers/usb/usbvideo.c Thu Nov 22 18:55:30 2001 @@ -36,7 +36,7 @@ #endif static int video_nr = -1; -MODULE_PARM(video_nr, "i"); +PARAM(video_nr, int, 000); /* * Local prototypes. diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/aty128fb.c tmp2/drivers/video/aty128fb.c --- tmp/drivers/video/aty128fb.c Thu Nov 22 18:18:47 2001 +++ tmp2/drivers/video/aty128fb.c Thu Nov 22 18:57:28 2001 @@ -2599,14 +2599,14 @@ MODULE_AUTHOR("(c)1999-2000 Brad Douglas "); MODULE_DESCRIPTION("FBDev driver for ATI Rage128 / Pro cards"); MODULE_LICENSE("GPL"); -MODULE_PARM(noaccel, "i"); +PARAM(noaccel, bool, 000); MODULE_PARM_DESC(noaccel, "Disable hardware acceleration (0 or 1=disabled) (default=0)"); -MODULE_PARM(font, "s"); +PARAM(font, charp, 000); MODULE_PARM_DESC(font, "Specify one of the compiled-in fonts (default=none)"); -MODULE_PARM(mode, "s"); +PARAM(mode, charp, 000); MODULE_PARM_DESC(mode, "Specify resolution as \"x[-][@]\" "); #ifdef CONFIG_MTRR -MODULE_PARM(nomtrr, "i"); +PARAM(nomtrr, int, 000); MODULE_PARM_DESC(nomtrr, "Disable MTRR support (0 or 1=disabled) (default=0)"); #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/cyber2000fb.c tmp2/drivers/video/cyber2000fb.c --- tmp/drivers/video/cyber2000fb.c Tue Nov 6 11:41:38 2001 +++ tmp2/drivers/video/cyber2000fb.c Thu Nov 22 18:55:30 2001 @@ -85,7 +85,7 @@ static char default_font_storage[40]; static char *default_font = "Acorn8x8"; -MODULE_PARM(default_font, "s"); +PARAM(default_font, charp, 000); MODULE_PARM_DESC(default_font, "Default font name"); /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/fbmem.c tmp2/drivers/video/fbmem.c --- tmp/drivers/video/fbmem.c Thu Nov 22 18:54:04 2001 +++ tmp2/drivers/video/fbmem.c Thu Nov 22 18:55:30 2001 @@ -838,7 +838,7 @@ * */ -int __init video_setup(char *options) +int __init video_setup(char *options, struct kernel_param *kp) { int i, j; @@ -854,10 +854,10 @@ options++; } if (*options != ',') - return 0; + return -EINVAL; options++; } else - return 0; + return -EINVAL; } if (!strncmp(options, "map:", 4)) { @@ -919,7 +919,7 @@ return 0; } -__setup("video=", video_setup); +PARAM_CALL(video, video_setup, NULL); /* * Visible symbols for modules diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/hgafb.c tmp2/drivers/video/hgafb.c --- tmp/drivers/video/hgafb.c Thu Nov 22 18:18:48 2001 +++ tmp2/drivers/video/hgafb.c Thu Nov 22 18:55:30 2001 @@ -847,9 +847,9 @@ MODULE_DESCRIPTION("FBDev driver for Hercules Graphics Adaptor"); MODULE_LICENSE("GPL"); -MODULE_PARM(font, "s"); +PARAM(font, charp, 000); MODULE_PARM_DESC(font, "Specifies one of the compiled-in fonts (VGA8x8, VGA8x16, SUN8x16, Acorn8x8, PEARL8x8) (default=none)"); -MODULE_PARM(nologo, "i"); +PARAM(nologo, int, 000); MODULE_PARM_DESC(nologo, "Disables startup logo if != 0 (default=0)"); #endif /* MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/matrox/matroxfb_base.c tmp2/drivers/video/matrox/matroxfb_base.c --- tmp/drivers/video/matrox/matroxfb_base.c Thu Nov 22 18:18:48 2001 +++ tmp2/drivers/video/matrox/matroxfb_base.c Thu Nov 22 18:55:30 2001 @@ -1328,9 +1328,7 @@ static int memtype = -1; /* "matrox:memtype:xxx" */ static char fontname[64]; /* "matrox:font:xxxxx" */ -#ifndef MODULE static char videomode[64]; /* "matrox:mode:xxxxx" or "matrox:xxxxx" */ -#endif static int matroxfb_getmemory(WPMINFO unsigned int maxSize, unsigned int *realSize){ vaddr_t vm; @@ -2358,10 +2356,9 @@ pci_unregister_driver(&matroxfb_driver); } -#ifndef MODULE - -/* ************************* init in-kernel code ************************** */ +/* ************************* init code ************************** */ +/* Called from drivers/video/fbmem.c, with video= */ int __init matroxfb_setup(char *options) { char *this_opt; @@ -2528,96 +2525,96 @@ return 0; } -#else - /* *************************** init module code **************************** */ MODULE_AUTHOR("(c) 1998-2001 Petr Vandrovec "); MODULE_DESCRIPTION("Accelerated FBDev driver for Matrox Millennium/Mystique/G100/G200/G400/G450"); MODULE_LICENSE("GPL"); -MODULE_PARM(mem, "i"); +PARAM(mem, int, 000); MODULE_PARM_DESC(mem, "Size of available memory in MB, KB or B (2,4,8,12,16MB, default=autodetect)"); -MODULE_PARM(disabled, "i"); +PARAM(disabled, int, 000); MODULE_PARM_DESC(disabled, "Disabled (0 or 1=disabled) (default=0)"); -MODULE_PARM(noaccel, "i"); +PARAM(noaccel, int, 000); MODULE_PARM_DESC(noaccel, "Do not use accelerating engine (0 or 1=disabled) (default=0)"); -MODULE_PARM(nopan, "i"); +PARAM(nopan, int, 000); MODULE_PARM_DESC(nopan, "Disable pan on startup (0 or 1=disabled) (default=0)"); -MODULE_PARM(no_pci_retry, "i"); +PARAM(no_pci_retry, int, 000); MODULE_PARM_DESC(no_pci_retry, "PCI retries enabled (0 or 1=disabled) (default=0)"); -MODULE_PARM(novga, "i"); +PARAM(novga, int, 000); MODULE_PARM_DESC(novga, "VGA I/O (0x3C0-0x3DF) disabled (0 or 1=disabled) (default=0)"); -MODULE_PARM(nobios, "i"); +PARAM(nobios, int, 000); MODULE_PARM_DESC(nobios, "Disables ROM BIOS (0 or 1=disabled) (default=do not change BIOS state)"); -MODULE_PARM(noinit, "i"); +PARAM(noinit, int, 000); MODULE_PARM_DESC(noinit, "Disables W/SG/SD-RAM and bus interface initialization (0 or 1=do not initialize) (default=0)"); -MODULE_PARM(memtype, "i"); +PARAM(memtype, int, 000); MODULE_PARM_DESC(memtype, "Memory type for G200/G400 (see Documentation/fb/matroxfb.txt for explanation) (default=3 for G200, 0 for G400)"); -MODULE_PARM(mtrr, "i"); +#ifdef CONFIG_MTRR +PARAM(mtrr, int, 000); MODULE_PARM_DESC(mtrr, "This speeds up video memory accesses (0=disabled or 1) (default=1)"); -MODULE_PARM(sgram, "i"); +#endif +PARAM(sgram, int, 000); MODULE_PARM_DESC(sgram, "Indicates that G100/G200/G400 has SGRAM memory (0=SDRAM, 1=SGRAM) (default=0)"); -MODULE_PARM(inv24, "i"); +PARAM(inv24, int, 000); MODULE_PARM_DESC(inv24, "Inverts clock polarity for 24bpp and loop frequency > 100MHz (default=do not invert polarity)"); -MODULE_PARM(inverse, "i"); +PARAM(inverse, int, 000); MODULE_PARM_DESC(inverse, "Inverse (0 or 1) (default=0)"); #ifdef CONFIG_FB_MATROX_MULTIHEAD -MODULE_PARM(dev, "i"); +PARAM(dev, int, 000); MODULE_PARM_DESC(dev, "Multihead support, attach to device ID (0..N) (default=all working)"); #else -MODULE_PARM(dev, "i"); +PARAM(dev, int, 000); MODULE_PARM_DESC(dev, "Multihead support, attach to device ID (0..N) (default=first working)"); #endif -MODULE_PARM(vesa, "i"); +PARAM(vesa, int, 000); MODULE_PARM_DESC(vesa, "Startup videomode (0x000-0x1FF) (default=0x101)"); -MODULE_PARM(xres, "i"); +PARAM(xres, int, 000); MODULE_PARM_DESC(xres, "Horizontal resolution (px), overrides xres from vesa (default=vesa)"); -MODULE_PARM(yres, "i"); +PARAM(yres, int, 000); MODULE_PARM_DESC(yres, "Vertical resolution (scans), overrides yres from vesa (default=vesa)"); -MODULE_PARM(upper, "i"); +PARAM(upper, int, 000); MODULE_PARM_DESC(upper, "Upper blank space (scans), overrides upper from vesa (default=vesa)"); -MODULE_PARM(lower, "i"); +PARAM(lower, int, 000); MODULE_PARM_DESC(lower, "Lower blank space (scans), overrides lower from vesa (default=vesa)"); -MODULE_PARM(vslen, "i"); +PARAM(vslen, int, 000); MODULE_PARM_DESC(vslen, "Vertical sync length (scans), overrides lower from vesa (default=vesa)"); -MODULE_PARM(left, "i"); +PARAM(left, int, 000); MODULE_PARM_DESC(left, "Left blank space (px), overrides left from vesa (default=vesa)"); -MODULE_PARM(right, "i"); +PARAM(right, int, 000); MODULE_PARM_DESC(right, "Right blank space (px), overrides right from vesa (default=vesa)"); -MODULE_PARM(hslen, "i"); +PARAM(hslen, int, 000); MODULE_PARM_DESC(hslen, "Horizontal sync length (px), overrides hslen from vesa (default=vesa)"); -MODULE_PARM(pixclock, "i"); +PARAM(pixclock, int, 000); MODULE_PARM_DESC(pixclock, "Pixelclock (ns), overrides pixclock from vesa (default=vesa)"); -MODULE_PARM(sync, "i"); +PARAM(sync, int, 000); MODULE_PARM_DESC(sync, "Sync polarity, overrides sync from vesa (default=vesa)"); -MODULE_PARM(depth, "i"); +PARAM(depth, int, 000); MODULE_PARM_DESC(depth, "Color depth (0=text,8,15,16,24,32) (default=vesa)"); -MODULE_PARM(maxclk, "i"); +PARAM(maxclk, int, 000); MODULE_PARM_DESC(maxclk, "Startup maximal clock, 0-999MHz, 1000-999999kHz, 1000000-INF Hz"); -MODULE_PARM(fh, "i"); +PARAM(fh, int, 000); MODULE_PARM_DESC(fh, "Startup horizontal frequency, 0-999kHz, 1000-INF Hz"); -MODULE_PARM(fv, "i"); +PARAM(fv, int, 000); MODULE_PARM_DESC(fv, "Startup vertical frequency, 0-INF Hz\n" "You should specify \"fv:max_monitor_vsync,fh:max_monitor_hsync,maxclk:max_monitor_dotclock\"\n"); -MODULE_PARM(hwcursor, "i"); +PARAM(hwcursor, int, 000); MODULE_PARM_DESC(hwcursor, "Enables hardware cursor (0 or 1) (default=0)"); -MODULE_PARM(blink, "i"); +PARAM(blink, int, 000); MODULE_PARM_DESC(blink, "Enables hardware cursor blinking (0 or 1) (default=1)"); -MODULE_PARM(fastfont, "i"); +PARAM(fastfont, int, 000); MODULE_PARM_DESC(fastfont, "Specifies, how much memory should be used for font data (0, 1024-65536 are reasonable) (default=0)"); -MODULE_PARM(grayscale, "i"); +PARAM(grayscale, int, 000); MODULE_PARM_DESC(grayscale, "Sets display into grayscale. Works perfectly with paletized videomode (4, 8bpp), some limitations apply to 16, 24 and 32bpp videomodes (default=nograyscale)"); -MODULE_PARM(cross4MB, "i"); +PARAM(cross4MB, int, 000); MODULE_PARM_DESC(cross4MB, "Specifies that 4MB boundary can be in middle of line. (default=autodetected)"); -MODULE_PARM(dfp, "i"); +PARAM(dfp, int, 000); MODULE_PARM_DESC(dfp, "Specifies whether to use digital flat panel interface of G200/G400 (0 or 1) (default=0)"); -MODULE_PARM(dfp_type, "i"); +PARAM(dfp_type, int, 000); MODULE_PARM_DESC(dfp_type, "Specifies DFP interface type (0 to 255) (default=read from hardware)"); #ifdef CONFIG_PPC -MODULE_PARM(vmode, "i"); +PARAM_NAMED(vmode, default_vmode, int, 000); MODULE_PARM_DESC(vmode, "Specify the vmode mode number that should be used (640x480 default)"); -MODULE_PARM(cmode, "i"); +PARAM_NAMED(cmode, default_cmode, int, 000); MODULE_PARM_DESC(cmode, "Specify the video depth that should be used (8bit default)"); #endif @@ -2650,7 +2647,6 @@ /* never return failure; user can hotplug matrox later... */ return 0; } -#endif /* MODULE */ module_exit(matrox_done); EXPORT_SYMBOL(matroxfb_register_driver); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/matrox/matroxfb_crtc2.c tmp2/drivers/video/matrox/matroxfb_crtc2.c --- tmp/drivers/video/matrox/matroxfb_crtc2.c Thu Nov 22 18:18:48 2001 +++ tmp2/drivers/video/matrox/matroxfb_crtc2.c Thu Nov 22 18:55:30 2001 @@ -19,7 +19,7 @@ static int mem = 8192; -MODULE_PARM(mem, "i"); +PARAM(mem, int, 000); MODULE_PARM_DESC(mem, "Memory size reserved for dualhead (default=8MB)"); /* **************************************************** */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/mdacon.c tmp2/drivers/video/mdacon.c --- tmp/drivers/video/mdacon.c Fri Sep 14 09:04:43 2001 +++ tmp2/drivers/video/mdacon.c Thu Nov 22 18:55:30 2001 @@ -80,8 +80,8 @@ static struct vc_data *mda_display_fg = NULL; -MODULE_PARM(mda_first_vc, "1-255i"); -MODULE_PARM(mda_last_vc, "1-255i"); +PARAM(mda_first_vc, int, 000); +PARAM(mda_last_vc, int, 000); /* MDA register values */ @@ -184,31 +184,6 @@ mda_cursor_size_from = from; mda_cursor_size_to = to; } - - -#ifndef MODULE -static int __init mdacon_setup(char *str) -{ - /* command line format: mdacon=, */ - - int ints[3]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - - if (ints[0] < 2) - return 0; - - if (ints[1] < 1 || ints[1] > MAX_NR_CONSOLES || - ints[2] < 1 || ints[2] > MAX_NR_CONSOLES) - return 0; - - mda_first_vc = ints[1]; - mda_last_vc = ints[2]; - return 1; -} - -__setup("mdacon=", mdacon_setup); -#endif static int __init mda_detect(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/pm2fb.c tmp2/drivers/video/pm2fb.c --- tmp/drivers/video/pm2fb.c Fri Sep 14 09:04:43 2001 +++ tmp2/drivers/video/pm2fb.c Thu Nov 22 18:55:30 2001 @@ -2156,7 +2156,7 @@ static char *mode = NULL; -MODULE_PARM(mode, "s"); +PARAM(mode, charp, 000); int __init init_module(void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/riva/fbdev.c tmp2/drivers/video/riva/fbdev.c --- tmp/drivers/video/riva/fbdev.c Thu Nov 22 18:18:48 2001 +++ tmp2/drivers/video/riva/fbdev.c Thu Nov 22 18:55:30 2001 @@ -251,12 +251,12 @@ /* command line data, set in rivafb_setup() */ static char fontname[40] __initdata = { 0 }; -static char noaccel __initdata = 0; -static char nomove = 0; -static char nohwcursor __initdata = 0; -static char noblink = 0; +static int noaccel __initdata = 0; +static int nomove = 0; +static int nohwcursor __initdata = 0; +static int noblink = 0; #ifdef CONFIG_MTRR -static char nomtrr __initdata = 0; +static int nomtrr __initdata = 0; #endif #ifndef MODULE @@ -2115,18 +2115,18 @@ module_init(rivafb_init); module_exit(rivafb_exit); -MODULE_PARM(font, "s"); +PARAM(font, charp, 000); MODULE_PARM_DESC(font, "Specifies one of the compiled-in fonts (default=none)"); -MODULE_PARM(noaccel, "i"); +PARAM(noaccel, bool, 000); MODULE_PARM_DESC(noaccel, "Disables hardware acceleration (0 or 1=disabled) (default=0)"); -MODULE_PARM(nomove, "i"); +PARAM(nomove, bool, 000); MODULE_PARM_DESC(nomove, "Enables YSCROLL_NOMOVE (0 or 1=enabled) (default=0)"); -MODULE_PARM(nohwcursor, "i"); +PARAM(nohwcursor, bool, 000); MODULE_PARM_DESC(nohwcursor, "Disables hardware cursor (0 or 1=disabled) (default=0)"); -MODULE_PARM(noblink, "i"); +PARAM(noblink, bool, 000); MODULE_PARM_DESC(noblink, "Disables hardware cursor blinking (0 or 1=disabled) (default=0)"); #ifdef CONFIG_MTRR -MODULE_PARM(nomtrr, "i"); +PARAM(nomtrr, bool, 000); MODULE_PARM_DESC(nomtrr, "Disables MTRR support (0 or 1=disabled) (default=0)"); #endif #endif /* MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/sis/sis_main.c tmp2/drivers/video/sis/sis_main.c --- tmp/drivers/video/sis/sis_main.c Thu Nov 22 18:18:49 2001 +++ tmp2/drivers/video/sis/sis_main.c Thu Nov 22 18:58:07 2001 @@ -2800,10 +2800,10 @@ static unsigned int rate = 0; static unsigned int crt1 = 1; -MODULE_PARM (mode, "s"); -MODULE_PARM (rate, "i"); -MODULE_PARM (crt1, "i"); -MODULE_PARM (filter, "i"); +PARAM (mode, charp, 000); +PARAM (rate, int, 000); +PARAM (crt1, int, 000); +PARAM (filter, int, 000); int init_module (void) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/sstfb.c tmp2/drivers/video/sstfb.c --- tmp/drivers/video/sstfb.c Thu Nov 22 18:18:49 2001 +++ tmp2/drivers/video/sstfb.c Thu Nov 22 18:55:30 2001 @@ -1996,19 +1996,19 @@ MODULE_DESCRIPTION("FBDev driver for 3dfx Voodoo Graphics and Voodoo2 based video boards"); MODULE_LICENSE("GPL"); -MODULE_PARM(mem, "i"); +PARAM(mem, int, 000); MODULE_PARM_DESC(mem, "Size of frame buffer memory in MiB (1, 2, 4 Mb, default=autodetect)"); -MODULE_PARM(vgapass, "i"); +PARAM(vgapass, int, 000); MODULE_PARM_DESC(vgapass, "Enable VGA PassThrough cable (0 or 1) (default=0)"); -MODULE_PARM(inverse, "i"); +PARAM(inverse, int, 000); MODULE_PARM_DESC(inverse, "Inverse colormap (0 or 1) (default=0)"); -MODULE_PARM(clipping , "i"); +PARAM(clipping, int, 000); MODULE_PARM_DESC(clipping, "Enable clipping (slower, safer) (0 or 1) (default=1)"); -MODULE_PARM(gfxclk , "i"); +PARAM(gfxclk, int, 000); MODULE_PARM_DESC(gfxclk, "Force graphic chip frequency in Mhz. DANGEROUS. (default=auto)"); -MODULE_PARM(slowpci, "i"); +PARAM(slowpci, int, 000); MODULE_PARM_DESC(slowpci, "Uses slow PCI settings (0 or 1) (default=0)"); -MODULE_PARM(dev,"i"); +PARAM(dev, int, 000); MODULE_PARM_DESC(dev , "Attach to device ID (0..n) (default=1st device)"); #endif /* MODULE */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/sticore.c tmp2/drivers/video/sticore.c --- tmp/drivers/video/sticore.c Fri Sep 14 09:04:43 2001 +++ tmp2/drivers/video/sticore.c Thu Nov 22 18:55:30 2001 @@ -271,7 +271,7 @@ static int font_index, font_height, font_width; -static int __init sti_font_setup(char *str) +static int __init sti_font_setup(char *str, struct kernel_param *kp) { char *x; @@ -288,7 +288,7 @@ return 0; } -__setup("sti_font=", sti_font_setup); +PARAM_CALL(sti_font, sti_font_setup, NULL); static int __init sti_search_font(struct sti_cooked_rom *rom, int height, int width) @@ -572,14 +572,14 @@ } static int __init -sti_setup(char *str) +sti_setup(char *str, struct kernel_param *kp) { char *end; if(strcmp(str, "pdc") == 0) { sti_address = PAGE0->proc_sti; - return 1; + return 0; } else { sti_address = simple_strtoul(str, &end, 16); @@ -590,12 +590,10 @@ sti_hpa = sti_address; - return 1; + return 0; } - - return 0; } -__setup("sti=", sti_setup); +PARAM_CALL(sti, sti_setup, NULL); MODULE_LICENSE("GPL"); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/vfb.c tmp2/drivers/video/vfb.c --- tmp/drivers/video/vfb.c Thu Nov 22 18:18:49 2001 +++ tmp2/drivers/video/vfb.c Thu Nov 22 18:55:30 2001 @@ -42,7 +42,7 @@ #define VIDEOMEMSIZE (1*1024*1024) /* 1 MB */ static u_long videomemory, videomemorysize = VIDEOMEMSIZE; -MODULE_PARM(videomemorysize, "l"); +PARAM(videomemorysize, long, 000); static int currcon = 0; static struct display disp; static struct fb_info fb_info; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal tmp/drivers/video/vgacon.c tmp2/drivers/video/vgacon.c --- tmp/drivers/video/vgacon.c Tue Oct 16 06:47:13 2001 +++ tmp2/drivers/video/vgacon.c Thu Nov 22 18:55:30 2001 @@ -126,7 +126,7 @@ static unsigned int vga_rolled_over = 0; -static int __init no_scroll(char *str) +static int __init no_scroll(char *str, struct kernel_param *kp) { /* * Disabling scrollback is required for the Braillex ib80-piezo @@ -137,7 +137,7 @@ return 1; } -__setup("no-scroll", no_scroll); +PARAM_CALL(no_scroll, no_scroll, NULL); /* * By replacing the four outb_p with two back to back outw, we can reduce