diff options
Diffstat (limited to 'drivers/char/watchdog/w83877f_wdt.c')
-rw-r--r-- | drivers/char/watchdog/w83877f_wdt.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/char/watchdog/w83877f_wdt.c b/drivers/char/watchdog/w83877f_wdt.c index b0e5f84d6baf..3c88fe18f4f4 100644 --- a/drivers/char/watchdog/w83877f_wdt.c +++ b/drivers/char/watchdog/w83877f_wdt.c | |||
@@ -87,10 +87,10 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (1<=timeout<=3600, defau | |||
87 | 87 | ||
88 | static int nowayout = WATCHDOG_NOWAYOUT; | 88 | static int nowayout = WATCHDOG_NOWAYOUT; |
89 | module_param(nowayout, int, 0); | 89 | module_param(nowayout, int, 0); |
90 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)"); | 90 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
91 | 91 | ||
92 | static void wdt_timer_ping(unsigned long); | 92 | static void wdt_timer_ping(unsigned long); |
93 | static struct timer_list timer; | 93 | static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0); |
94 | static unsigned long next_heartbeat; | 94 | static unsigned long next_heartbeat; |
95 | static unsigned long wdt_is_open; | 95 | static unsigned long wdt_is_open; |
96 | static char wdt_expect_close; | 96 | static char wdt_expect_close; |
@@ -114,8 +114,7 @@ static void wdt_timer_ping(unsigned long data) | |||
114 | inb_p(WDT_PING); | 114 | inb_p(WDT_PING); |
115 | 115 | ||
116 | /* Re-set the timer interval */ | 116 | /* Re-set the timer interval */ |
117 | timer.expires = jiffies + WDT_INTERVAL; | 117 | mod_timer(&timer, jiffies + WDT_INTERVAL); |
118 | add_timer(&timer); | ||
119 | 118 | ||
120 | spin_unlock(&wdt_spinlock); | 119 | spin_unlock(&wdt_spinlock); |
121 | 120 | ||
@@ -155,8 +154,7 @@ static void wdt_startup(void) | |||
155 | next_heartbeat = jiffies + (timeout * HZ); | 154 | next_heartbeat = jiffies + (timeout * HZ); |
156 | 155 | ||
157 | /* Start the timer */ | 156 | /* Start the timer */ |
158 | timer.expires = jiffies + WDT_INTERVAL; | 157 | mod_timer(&timer, jiffies + WDT_INTERVAL); |
159 | add_timer(&timer); | ||
160 | 158 | ||
161 | wdt_change(WDT_ENABLE); | 159 | wdt_change(WDT_ENABLE); |
162 | 160 | ||
@@ -377,10 +375,6 @@ static int __init w83877f_wdt_init(void) | |||
377 | goto err_out_region1; | 375 | goto err_out_region1; |
378 | } | 376 | } |
379 | 377 | ||
380 | init_timer(&timer); | ||
381 | timer.function = wdt_timer_ping; | ||
382 | timer.data = 0; | ||
383 | |||
384 | rc = misc_register(&wdt_miscdev); | 378 | rc = misc_register(&wdt_miscdev); |
385 | if (rc) | 379 | if (rc) |
386 | { | 380 | { |