aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/watchdog/machzwd.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-02-13 22:02:32 -0800
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-02-13 22:02:32 -0800
commitac98695d6c1508b724f246f38ce57fb4e3cec356 (patch)
tree189969a3689b9b83eaf39314a7942cc781ff836b /drivers/char/watchdog/machzwd.c
parentd9bc125caf592b7d081021f32ce5b717efdf70c8 (diff)
parent93bbad8fe13a25dcf7f3bc628a71d1a7642ae61b (diff)
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'drivers/char/watchdog/machzwd.c')
-rw-r--r--drivers/char/watchdog/machzwd.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c
index 4d730fdbd52..81fb3dec180 100644
--- a/drivers/char/watchdog/machzwd.c
+++ b/drivers/char/watchdog/machzwd.c
@@ -95,7 +95,7 @@ MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
static int nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
#define PFX "machzwd"
@@ -118,12 +118,14 @@ static int action = 0;
module_param(action, int, 0);
MODULE_PARM_DESC(action, "after watchdog resets, generate: 0 = RESET(*) 1 = SMI 2 = NMI 3 = SCI");
+static void zf_ping(unsigned long data);
+
static int zf_action = GEN_RESET;
static unsigned long zf_is_open;
static char zf_expect_close;
static spinlock_t zf_lock;
static spinlock_t zf_port_lock;
-static struct timer_list zf_timer;
+static DEFINE_TIMER(zf_timer, zf_ping, 0, 0);
static unsigned long next_heartbeat = 0;
@@ -220,9 +222,7 @@ static void zf_timer_on(void)
next_heartbeat = jiffies + ZF_USER_TIMEO;
/* start the timer for internal ping */
- zf_timer.expires = jiffies + ZF_HW_TIMEO;
-
- add_timer(&zf_timer);
+ mod_timer(&zf_timer, jiffies + ZF_HW_TIMEO);
/* start watchdog timer */
ctrl_reg = zf_get_control();
@@ -260,8 +260,7 @@ static void zf_ping(unsigned long data)
zf_set_control(ctrl_reg);
spin_unlock_irqrestore(&zf_port_lock, flags);
- zf_timer.expires = jiffies + ZF_HW_TIMEO;
- add_timer(&zf_timer);
+ mod_timer(&zf_timer, jiffies + ZF_HW_TIMEO);
}else{
printk(KERN_CRIT PFX ": I will reset your machine\n");
}
@@ -465,11 +464,6 @@ static int __init zf_init(void)
zf_set_status(0);
zf_set_control(0);
- /* this is the timer that will do the hard work */
- init_timer(&zf_timer);
- zf_timer.function = zf_ping;
- zf_timer.data = 0;
-
return 0;
no_reboot: