diff options
Diffstat (limited to 'drivers/char/watchdog/sbc60xxwdt.c')
-rw-r--r-- | drivers/char/watchdog/sbc60xxwdt.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/char/watchdog/sbc60xxwdt.c b/drivers/char/watchdog/sbc60xxwdt.c index f5fb8cc23d52..b6282039198c 100644 --- a/drivers/char/watchdog/sbc60xxwdt.c +++ b/drivers/char/watchdog/sbc60xxwdt.c | |||
@@ -103,7 +103,7 @@ module_param(nowayout, int, 0); | |||
103 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 103 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
104 | 104 | ||
105 | static void wdt_timer_ping(unsigned long); | 105 | static void wdt_timer_ping(unsigned long); |
106 | static struct timer_list timer; | 106 | static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0); |
107 | static unsigned long next_heartbeat; | 107 | static unsigned long next_heartbeat; |
108 | static unsigned long wdt_is_open; | 108 | static unsigned long wdt_is_open; |
109 | static char wdt_expect_close; | 109 | static char wdt_expect_close; |
@@ -122,8 +122,7 @@ static void wdt_timer_ping(unsigned long data) | |||
122 | /* Ping the WDT by reading from wdt_start */ | 122 | /* Ping the WDT by reading from wdt_start */ |
123 | inb_p(wdt_start); | 123 | inb_p(wdt_start); |
124 | /* Re-set the timer interval */ | 124 | /* Re-set the timer interval */ |
125 | timer.expires = jiffies + WDT_INTERVAL; | 125 | mod_timer(&timer, jiffies + WDT_INTERVAL); |
126 | add_timer(&timer); | ||
127 | } else { | 126 | } else { |
128 | printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n"); | 127 | printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n"); |
129 | } | 128 | } |
@@ -138,8 +137,7 @@ static void wdt_startup(void) | |||
138 | next_heartbeat = jiffies + (timeout * HZ); | 137 | next_heartbeat = jiffies + (timeout * HZ); |
139 | 138 | ||
140 | /* Start the timer */ | 139 | /* Start the timer */ |
141 | timer.expires = jiffies + WDT_INTERVAL; | 140 | mod_timer(&timer, jiffies + WDT_INTERVAL); |
142 | add_timer(&timer); | ||
143 | printk(KERN_INFO PFX "Watchdog timer is now enabled.\n"); | 141 | printk(KERN_INFO PFX "Watchdog timer is now enabled.\n"); |
144 | } | 142 | } |
145 | 143 | ||
@@ -363,10 +361,6 @@ static int __init sbc60xxwdt_init(void) | |||
363 | } | 361 | } |
364 | } | 362 | } |
365 | 363 | ||
366 | init_timer(&timer); | ||
367 | timer.function = wdt_timer_ping; | ||
368 | timer.data = 0; | ||
369 | |||
370 | rc = misc_register(&wdt_miscdev); | 364 | rc = misc_register(&wdt_miscdev); |
371 | if (rc) | 365 | if (rc) |
372 | { | 366 | { |