Commit 97cb93ec authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[WATCHDOG] Advantech fixes from 2.4

parent 0e02e111
......@@ -99,10 +99,22 @@ advwdt_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
return -ESPIPE;
if (count) {
if (!nowayout) {
size_t i;
adv_expect_close = 0;
for (i = 0; i != count; i++) {
char c;
if (get_user(c, buf+i))
return -EFAULT;
if (c == 'V')
adv_expect_close = 42;
}
}
advwdt_ping();
return 1;
}
return 0;
return count;
}
static ssize_t
......@@ -116,7 +128,9 @@ advwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
{
static struct watchdog_info ident = {
WDIOF_KEEPALIVEPING, 1, "Advantech WDT"
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
.firmware_version = 1,
.identity = "Advantech WDT"
};
switch (cmd) {
......
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