diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2007-02-14 01:24:34 +0300 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2007-02-14 01:24:34 +0300 |
commit | 88d5a7bb75b5e8f600e79b16abaf008c7fdfd27d (patch) | |
tree | 0ff6ddf9d7ba817f62d51c94a2db333f22880501 /drivers/char/watchdog/alim7101_wdt.c | |
parent | 9af9fc45ddd3e315c51f87392b5048967e4343cd (diff) | |
parent | 82eb7c5059de64bd43f6b3cf3f128470f2b3fb83 (diff) | |
download | linux-88d5a7bb75b5e8f600e79b16abaf008c7fdfd27d.tar.xz |
Merge ../linux-2.6-watchdog-mm
Diffstat (limited to 'drivers/char/watchdog/alim7101_wdt.c')
-rw-r--r-- | drivers/char/watchdog/alim7101_wdt.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/char/watchdog/alim7101_wdt.c b/drivers/char/watchdog/alim7101_wdt.c index bf25d0a55a99..c195078688de 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); MODULE_PARM_DESC(use_gpio, "Use the gpio watchdog. (required by old cobalt boards)"); static void wdt_timer_ping(unsigned long); -static struct timer_list timer; +static DEFINE_TIMER(timer, wdt_timer_ping, 0, 1); static unsigned long next_heartbeat; static unsigned long wdt_is_open; static char wdt_expect_close; @@ -78,7 +78,7 @@ static struct pci_dev *alim7101_pmu; static int nowayout = WATCHDOG_NOWAYOUT; module_param(nowayout, int, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" - __stringify(CONFIG_WATCHDOG_NOWAYOUT) ")"); + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); /* * Whack the dog @@ -108,8 +108,7 @@ static void wdt_timer_ping(unsigned long data) printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n"); } /* Re-set the timer interval */ - timer.expires = jiffies + WDT_INTERVAL; - add_timer(&timer); + mod_timer(&timer, jiffies + WDT_INTERVAL); } /* @@ -147,9 +146,7 @@ static void wdt_startup(void) wdt_change(WDT_ENABLE); /* Start the timer */ - timer.expires = jiffies + WDT_INTERVAL; - add_timer(&timer); - + mod_timer(&timer, jiffies + WDT_INTERVAL); printk(KERN_INFO PFX "Watchdog timer is now enabled.\n"); } @@ -380,10 +377,6 @@ static int __init alim7101_wdt_init(void) timeout); } - init_timer(&timer); - timer.function = wdt_timer_ping; - timer.data = 1; - rc = misc_register(&wdt_miscdev); if (rc) { printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", |