aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog/cpu5wdt.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-13 19:10:08 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-13 19:10:08 -0500
commit58a3bb59973e33a428d72fa530a3d1d81feb0e8f (patch)
tree11a6f4838ec20d96bc287a62f21c4b10f0c86b1a /drivers/char/watchdog/cpu5wdt.c
parent7f1f86a0d04e79f8165e6f50d329a520b8cd11e5 (diff)
parent88d5a7bb75b5e8f600e79b16abaf008c7fdfd27d (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: (23 commits) [WATCHDOG] timers cleanup [WATCHDOG] ib700wdt.c - convert to platform_device part 2 [WATCHDOG] ib700wdt.c - convert to platform_device [WATCHDOG] ib700wdt.c spinlock/WDIOC_SETOPTIONS changes [WATCHDOG] ib700wdt.c small clean-up's [WATCHDOG] ib700wdt.c clean-up init and exit routines [WATCHDOG] ib700_wdt.c stop + set_heartbeat operations [WATCHDOG] show default value for nowayout in module parameter [WATCHDOG] advantechwdt.c - convert to platform_device part 2 [WATCHDOG] advantechwdt.c - convert to platform_device [WATCHDOG] advantechwdt.c - move set_heartbeat to a seperate function [WATCHDOG] advantechwdt.c - cleanup before platform_device patches [WATCHDOG] acquirewdt.c - convert to platform_device part 2 [WATCHDOG] acquirewdt.c - convert to platform_device [WATCHDOG] acquirewdt.c - clean before platform_device patches [WATCHDOG] pcwd_usb.c - get heartbeat from dip switches [WATCHDOG] pcwd.c - e-mail adres update [WATCHDOG] pcwd_usb.c - get heartbeat from dip switches [WATCHDOG] pcwd_usb.c - document includes [WATCHDOG] pcwd_pci.c - spinlock fixes ...
Diffstat (limited to 'drivers/char/watchdog/cpu5wdt.c')
-rw-r--r--drivers/char/watchdog/cpu5wdt.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/char/watchdog/cpu5wdt.c b/drivers/char/watchdog/cpu5wdt.c
index 00bdabb90f27..bcd7e36ca0aa 100644
--- a/drivers/char/watchdog/cpu5wdt.c
+++ b/drivers/char/watchdog/cpu5wdt.c
@@ -80,10 +80,8 @@ static void cpu5wdt_trigger(unsigned long unused)
80 outb(1, port + CPU5WDT_TRIGGER_REG); 80 outb(1, port + CPU5WDT_TRIGGER_REG);
81 81
82 /* requeue?? */ 82 /* requeue?? */
83 if( cpu5wdt_device.queue && ticks ) { 83 if (cpu5wdt_device.queue && ticks)
84 cpu5wdt_device.timer.expires = jiffies + CPU5WDT_INTERVAL; 84 mod_timer(&cpu5wdt_device.timer, jiffies + CPU5WDT_INTERVAL);
85 add_timer(&cpu5wdt_device.timer);
86 }
87 else { 85 else {
88 /* ticks doesn't matter anyway */ 86 /* ticks doesn't matter anyway */
89 complete(&cpu5wdt_device.stop); 87 complete(&cpu5wdt_device.stop);
@@ -109,8 +107,7 @@ static void cpu5wdt_start(void)
109 outb(1, port + CPU5WDT_MODE_REG); 107 outb(1, port + CPU5WDT_MODE_REG);
110 outb(0, port + CPU5WDT_RESET_REG); 108 outb(0, port + CPU5WDT_RESET_REG);
111 outb(0, port + CPU5WDT_ENABLE_REG); 109 outb(0, port + CPU5WDT_ENABLE_REG);
112 cpu5wdt_device.timer.expires = jiffies + CPU5WDT_INTERVAL; 110 mod_timer(&cpu5wdt_device.timer, jiffies + CPU5WDT_INTERVAL);
113 add_timer(&cpu5wdt_device.timer);
114 } 111 }
115 /* if process dies, counter is not decremented */ 112 /* if process dies, counter is not decremented */
116 cpu5wdt_device.running++; 113 cpu5wdt_device.running++;
@@ -245,9 +242,7 @@ static int __devinit cpu5wdt_init(void)
245 242
246 clear_bit(0, &cpu5wdt_device.inuse); 243 clear_bit(0, &cpu5wdt_device.inuse);
247 244
248 init_timer(&cpu5wdt_device.timer); 245 setup_timer(&cpu5wdt_device.timer, cpu5wdt_trigger, 0);
249 cpu5wdt_device.timer.function = cpu5wdt_trigger;
250 cpu5wdt_device.timer.data = 0;
251 246
252 cpu5wdt_device.default_ticks = ticks; 247 cpu5wdt_device.default_ticks = ticks;
253 248