aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog/alim7101_wdt.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/alim7101_wdt.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/alim7101_wdt.c')
-rw-r--r--drivers/char/watchdog/alim7101_wdt.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/char/watchdog/alim7101_wdt.c b/drivers/char/watchdog/alim7101_wdt.c
index e5b2c2ee292c..67aed9f8c362 100644
--- a/drivers/char/watchdog/alim7101_wdt.c
+++ b/drivers/char/watchdog/alim7101_wdt.c
@@ -69,7 +69,7 @@ module_param(use_gpio, int, 0);
69MODULE_PARM_DESC(use_gpio, "Use the gpio watchdog. (required by old cobalt boards)"); 69MODULE_PARM_DESC(use_gpio, "Use the gpio watchdog. (required by old cobalt boards)");
70 70
71static void wdt_timer_ping(unsigned long); 71static void wdt_timer_ping(unsigned long);
72static struct timer_list timer; 72static DEFINE_TIMER(timer, wdt_timer_ping, 0, 1);
73static unsigned long next_heartbeat; 73static unsigned long next_heartbeat;
74static unsigned long wdt_is_open; 74static unsigned long wdt_is_open;
75static char wdt_expect_close; 75static char wdt_expect_close;
@@ -78,7 +78,7 @@ static struct pci_dev *alim7101_pmu;
78static int nowayout = WATCHDOG_NOWAYOUT; 78static int nowayout = WATCHDOG_NOWAYOUT;
79module_param(nowayout, int, 0); 79module_param(nowayout, int, 0);
80MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" 80MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
81 __stringify(CONFIG_WATCHDOG_NOWAYOUT) ")"); 81 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
82 82
83/* 83/*
84 * Whack the dog 84 * Whack the dog
@@ -108,8 +108,7 @@ static void wdt_timer_ping(unsigned long data)
108 printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n"); 108 printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n");
109 } 109 }
110 /* Re-set the timer interval */ 110 /* Re-set the timer interval */
111 timer.expires = jiffies + WDT_INTERVAL; 111 mod_timer(&timer, jiffies + WDT_INTERVAL);
112 add_timer(&timer);
113} 112}
114 113
115/* 114/*
@@ -147,9 +146,7 @@ static void wdt_startup(void)
147 wdt_change(WDT_ENABLE); 146 wdt_change(WDT_ENABLE);
148 147
149 /* Start the timer */ 148 /* Start the timer */
150 timer.expires = jiffies + WDT_INTERVAL; 149 mod_timer(&timer, jiffies + WDT_INTERVAL);
151 add_timer(&timer);
152
153 150
154 printk(KERN_INFO PFX "Watchdog timer is now enabled.\n"); 151 printk(KERN_INFO PFX "Watchdog timer is now enabled.\n");
155} 152}
@@ -380,10 +377,6 @@ static int __init alim7101_wdt_init(void)
380 timeout); 377 timeout);
381 } 378 }
382 379
383 init_timer(&timer);
384 timer.function = wdt_timer_ping;
385 timer.data = 1;
386
387 rc = misc_register(&wdt_miscdev); 380 rc = misc_register(&wdt_miscdev);
388 if (rc) { 381 if (rc) {
389 printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", 382 printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",