From: Wim Van Sebroeck Convert last set of watchdog drivers to new moduleparam system. --- drivers/char/watchdog/amd7xx_tco.c | 19 ----------------- drivers/char/watchdog/cpu5wdt.c | 7 +++--- drivers/char/watchdog/eurotechwdt.c | 39 ++++-------------------------------- drivers/char/watchdog/sc1200wdt.c | 35 ++++---------------------------- drivers/char/watchdog/wdt.c | 38 +++-------------------------------- 5 files changed, 18 insertions(+), 120 deletions(-) diff -puN drivers/char/watchdog/amd7xx_tco.c~watchdog-moduleparam-patches drivers/char/watchdog/amd7xx_tco.c --- 25/drivers/char/watchdog/amd7xx_tco.c~watchdog-moduleparam-patches 2004-03-07 17:03:14.000000000 -0800 +++ 25-akpm/drivers/char/watchdog/amd7xx_tco.c 2004-03-07 17:03:14.000000000 -0800 @@ -365,25 +365,6 @@ static void __exit amdtco_exit(void) unregister_reboot_notifier(&amdtco_notifier); } - -#ifndef MODULE -static int __init amdtco_setup(char *str) -{ - int ints[4]; - - str = get_options (str, ARRAY_SIZE(ints), ints); - if (ints[0] > 0) - timeout = ints[1]; - - if (!timeout || timeout > MAX_TIMEOUT) - timeout = MAX_TIMEOUT; - - return 1; -} - -__setup("amd7xx_tco=", amdtco_setup); -#endif - module_init(amdtco_init); module_exit(amdtco_exit); diff -puN drivers/char/watchdog/cpu5wdt.c~watchdog-moduleparam-patches drivers/char/watchdog/cpu5wdt.c --- 25/drivers/char/watchdog/cpu5wdt.c~watchdog-moduleparam-patches 2004-03-07 17:03:14.000000000 -0800 +++ 25-akpm/drivers/char/watchdog/cpu5wdt.c 2004-03-07 17:03:14.000000000 -0800 @@ -20,6 +20,7 @@ */ #include +#include #include #include #include @@ -295,11 +296,11 @@ MODULE_SUPPORTED_DEVICE("sma cpu5 watchd MODULE_LICENSE("GPL"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); -MODULE_PARM(port, "i"); +module_param(port, int, 0); MODULE_PARM_DESC(port, "base address of watchdog card, default is 0x91"); -MODULE_PARM(verbose, "i"); +module_param(verbose, int, 0); MODULE_PARM_DESC(verbose, "be verbose, default is 0 (no)"); -MODULE_PARM(ticks, "i"); +module_param(ticks, int, 0); MODULE_PARM_DESC(ticks, "count down ticks, default is 10000"); diff -puN drivers/char/watchdog/eurotechwdt.c~watchdog-moduleparam-patches drivers/char/watchdog/eurotechwdt.c --- 25/drivers/char/watchdog/eurotechwdt.c~watchdog-moduleparam-patches 2004-03-07 17:03:14.000000000 -0800 +++ 25-akpm/drivers/char/watchdog/eurotechwdt.c 2004-03-07 17:03:14.000000000 -0800 @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -77,7 +78,7 @@ static int nowayout = 1; static int nowayout = 0; #endif -MODULE_PARM(nowayout,"i"); +module_param(nowayout, int, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)"); /* @@ -94,41 +95,11 @@ MODULE_PARM_DESC(nowayout, "Watchdog can #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("eurwdt=", eurwdt_setup); - -#endif /* !MODULE */ - -MODULE_PARM(io, "i"); +module_param(io, int, 0); MODULE_PARM_DESC(io, "Eurotech WDT io port (default=0x3f0)"); -MODULE_PARM(irq, "i"); +module_param(irq, int, 0); MODULE_PARM_DESC(irq, "Eurotech WDT irq (default=10)"); -MODULE_PARM(ev, "s"); +module_param(ev, charp, 0); MODULE_PARM_DESC(ev, "Eurotech WDT event type (default is `int')"); diff -puN drivers/char/watchdog/sc1200wdt.c~watchdog-moduleparam-patches drivers/char/watchdog/sc1200wdt.c --- 25/drivers/char/watchdog/sc1200wdt.c~watchdog-moduleparam-patches 2004-03-07 17:03:14.000000000 -0800 +++ 25-akpm/drivers/char/watchdog/sc1200wdt.c 2004-03-07 17:03:14.000000000 -0800 @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -80,13 +81,13 @@ spinlock_t sc1200wdt_lock; /* io port ac static int isapnp = 1; static struct pnp_dev *wdt_dev; -MODULE_PARM(isapnp, "i"); +module_param(isapnp, int, 0); MODULE_PARM_DESC(isapnp, "When set to 0 driver ISA PnP support will be disabled"); #endif -MODULE_PARM(io, "i"); +module_param(io, int, 0); MODULE_PARM_DESC(io, "io port"); -MODULE_PARM(timeout, "i"); +module_param(timeout, int, 0); MODULE_PARM_DESC(timeout, "range is 0-255 minutes, default is 1"); #ifdef CONFIG_WATCHDOG_NOWAYOUT @@ -95,7 +96,7 @@ static int nowayout = 1; static int nowayout = 0; #endif -MODULE_PARM(nowayout,"i"); +module_param(nowayout, int, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)"); @@ -454,32 +455,6 @@ static void __exit sc1200wdt_exit(void) release_region(io, io_len); } - -#ifndef MODULE -static int __init sc1200wdt_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) - timeout = ints[2]; - -#if defined CONFIG_PNP - if (ints[0] > 2) - isapnp = ints[3]; -#endif - } - - return 1; -} - -__setup("sc1200wdt=", sc1200wdt_setup); -#endif /* MODULE */ - - module_init(sc1200wdt_init); module_exit(sc1200wdt_exit); diff -puN drivers/char/watchdog/wdt.c~watchdog-moduleparam-patches drivers/char/watchdog/wdt.c --- 25/drivers/char/watchdog/wdt.c~watchdog-moduleparam-patches 2004-03-07 17:03:14.000000000 -0800 +++ 25-akpm/drivers/char/watchdog/wdt.c 2004-03-07 17:03:14.000000000 -0800 @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -70,43 +71,12 @@ static int nowayout = 1; static int nowayout = 0; #endif -MODULE_PARM(nowayout,"i"); +module_param(nowayout, int, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)"); -#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"); +module_param(io, int, 0); MODULE_PARM_DESC(io, "WDT io port (default=0x240)"); -MODULE_PARM(irq, "i"); +module_param(irq, int, 0); MODULE_PARM_DESC(irq, "WDT irq (default=11)"); /* _