Commit a74c51c3 authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

[WATCHDOG] 2.6.0-rc1 i810-tco.c.nowayout.patch

Fix nowayout handling to the way all other watchdog-drivers do it
parent df21fd50
......@@ -197,7 +197,7 @@ static int i810tco_release (struct inode *inode, struct file *file)
/*
* Shut off the timer.
*/
if (tco_expect_close == 42 && !nowayout) {
if (tco_expect_close == 42) {
tco_timer_stop ();
} else {
tco_timer_reload ();
......@@ -217,8 +217,11 @@ static ssize_t i810tco_write (struct file *file, const char *data,
/* See if we got the magic character 'V' and reload the timer */
if (len) {
if (!nowayout) {
size_t i;
/* note: just in case someone wrote the magic character
* five months ago... */
tco_expect_close = 0;
/* scan to see whether or not we got the magic character */
......@@ -229,6 +232,7 @@ static ssize_t i810tco_write (struct file *file, const char *data,
if (c == 'V')
tco_expect_close = 42;
}
}
/* someone wrote to us, we should reload the timer */
tco_timer_reload ();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment