Commit 1c272552 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] watchdog: moduleparam-patches

From: Wim Van Sebroeck <wim@iguana.be>

Convert last set of watchdog drivers to new moduleparam system.
parent 10658a35
......@@ -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);
......
......@@ -20,6 +20,7 @@
*/
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
......@@ -295,11 +296,11 @@ MODULE_SUPPORTED_DEVICE("sma cpu5 watchdog");
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");
......@@ -43,6 +43,7 @@
#include <linux/config.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
......@@ -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 cannot be stopped once started (default=CON
#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')");
......
......@@ -29,6 +29,7 @@
#include <linux/config.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/ioport.h>
......@@ -80,13 +81,13 @@ spinlock_t sc1200wdt_lock; /* io port access serialisation */
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);
......
......@@ -34,6 +34,7 @@
#include <linux/config.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
......@@ -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)");
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment