diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-02-14 01:02:32 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-02-14 01:02:32 -0500 |
commit | ac98695d6c1508b724f246f38ce57fb4e3cec356 (patch) | |
tree | 189969a3689b9b83eaf39314a7942cc781ff836b /drivers/char/watchdog/mixcomwd.c | |
parent | d9bc125caf592b7d081021f32ce5b717efdf70c8 (diff) | |
parent | 93bbad8fe13a25dcf7f3bc628a71d1a7642ae61b (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'drivers/char/watchdog/mixcomwd.c')
-rw-r--r-- | drivers/char/watchdog/mixcomwd.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/char/watchdog/mixcomwd.c b/drivers/char/watchdog/mixcomwd.c index c2dac0aa1d62..f35e2848aa3e 100644 --- a/drivers/char/watchdog/mixcomwd.c +++ b/drivers/char/watchdog/mixcomwd.c | |||
@@ -56,16 +56,18 @@ static int mixcomwd_ioports[] = { 0x180, 0x280, 0x380, 0x000 }; | |||
56 | #define FLASHCOM_WATCHDOG_OFFSET 0x4 | 56 | #define FLASHCOM_WATCHDOG_OFFSET 0x4 |
57 | #define FLASHCOM_ID 0x18 | 57 | #define FLASHCOM_ID 0x18 |
58 | 58 | ||
59 | static void mixcomwd_timerfun(unsigned long d); | ||
60 | |||
59 | static unsigned long mixcomwd_opened; /* long req'd for setbit --RR */ | 61 | static unsigned long mixcomwd_opened; /* long req'd for setbit --RR */ |
60 | 62 | ||
61 | static int watchdog_port; | 63 | static int watchdog_port; |
62 | static int mixcomwd_timer_alive; | 64 | static int mixcomwd_timer_alive; |
63 | static DEFINE_TIMER(mixcomwd_timer, NULL, 0, 0); | 65 | static DEFINE_TIMER(mixcomwd_timer, mixcomwd_timerfun, 0, 0); |
64 | static char expect_close; | 66 | static char expect_close; |
65 | 67 | ||
66 | static int nowayout = WATCHDOG_NOWAYOUT; | 68 | static int nowayout = WATCHDOG_NOWAYOUT; |
67 | module_param(nowayout, int, 0); | 69 | module_param(nowayout, int, 0); |
68 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)"); | 70 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
69 | 71 | ||
70 | static void mixcomwd_ping(void) | 72 | static void mixcomwd_ping(void) |
71 | { | 73 | { |
@@ -77,7 +79,7 @@ static void mixcomwd_timerfun(unsigned long d) | |||
77 | { | 79 | { |
78 | mixcomwd_ping(); | 80 | mixcomwd_ping(); |
79 | 81 | ||
80 | mod_timer(&mixcomwd_timer,jiffies+ 5*HZ); | 82 | mod_timer(&mixcomwd_timer, jiffies + 5 * HZ); |
81 | } | 83 | } |
82 | 84 | ||
83 | /* | 85 | /* |
@@ -114,12 +116,8 @@ static int mixcomwd_release(struct inode *inode, struct file *file) | |||
114 | printk(KERN_ERR "mixcomwd: release called while internal timer alive"); | 116 | printk(KERN_ERR "mixcomwd: release called while internal timer alive"); |
115 | return -EBUSY; | 117 | return -EBUSY; |
116 | } | 118 | } |
117 | init_timer(&mixcomwd_timer); | ||
118 | mixcomwd_timer.expires=jiffies + 5 * HZ; | ||
119 | mixcomwd_timer.function=mixcomwd_timerfun; | ||
120 | mixcomwd_timer.data=0; | ||
121 | mixcomwd_timer_alive=1; | 119 | mixcomwd_timer_alive=1; |
122 | add_timer(&mixcomwd_timer); | 120 | mod_timer(&mixcomwd_timer, jiffies + 5 * HZ); |
123 | } else { | 121 | } else { |
124 | printk(KERN_CRIT "mixcomwd: WDT device closed unexpectedly. WDT will not stop!\n"); | 122 | printk(KERN_CRIT "mixcomwd: WDT device closed unexpectedly. WDT will not stop!\n"); |
125 | } | 123 | } |
@@ -285,7 +283,7 @@ static void __exit mixcomwd_exit(void) | |||
285 | if(mixcomwd_timer_alive) { | 283 | if(mixcomwd_timer_alive) { |
286 | printk(KERN_WARNING "mixcomwd: I quit now, hardware will" | 284 | printk(KERN_WARNING "mixcomwd: I quit now, hardware will" |
287 | " probably reboot!\n"); | 285 | " probably reboot!\n"); |
288 | del_timer(&mixcomwd_timer); | 286 | del_timer_sync(&mixcomwd_timer); |
289 | mixcomwd_timer_alive=0; | 287 | mixcomwd_timer_alive=0; |
290 | } | 288 | } |
291 | } | 289 | } |