diff options
Diffstat (limited to 'drivers/char/watchdog/alim7101_wdt.c')
-rw-r--r-- | drivers/char/watchdog/alim7101_wdt.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/char/watchdog/alim7101_wdt.c b/drivers/char/watchdog/alim7101_wdt.c index 1dacec5c9637..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); | |||
69 | MODULE_PARM_DESC(use_gpio, "Use the gpio watchdog. (required by old cobalt boards)"); | 69 | MODULE_PARM_DESC(use_gpio, "Use the gpio watchdog. (required by old cobalt boards)"); |
70 | 70 | ||
71 | static void wdt_timer_ping(unsigned long); | 71 | static void wdt_timer_ping(unsigned long); |
72 | static struct timer_list timer; | 72 | static DEFINE_TIMER(timer, wdt_timer_ping, 0, 1); |
73 | static unsigned long next_heartbeat; | 73 | static unsigned long next_heartbeat; |
74 | static unsigned long wdt_is_open; | 74 | static unsigned long wdt_is_open; |
75 | static char wdt_expect_close; | 75 | static char wdt_expect_close; |
@@ -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", |