X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fwatchdog%2Falim1535_wdt.c;h=f093a698f96f9477b70755d8dd817171ffb0eed6;hb=1341115471cc16954510b0e67295468f5a32b088;hp=35dcbf8be7d1c93054a2148b0890be6a2b049b79;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/drivers/char/watchdog/alim1535_wdt.c b/drivers/char/watchdog/alim1535_wdt.c index 35dcbf8be..f093a698f 100644 --- a/drivers/char/watchdog/alim1535_wdt.c +++ b/drivers/char/watchdog/alim1535_wdt.c @@ -141,6 +141,10 @@ static int ali_settimer(int t) static ssize_t ali_write(struct file *file, const char __user *data, size_t len, loff_t * ppos) { + /* Can't seek (pwrite) on this device */ + if (ppos != &file->f_pos) + return -ESPIPE; + /* See if we got the magic character 'V' and reload the timer */ if (len) { if (!nowayout) { @@ -262,7 +266,7 @@ static int ali_open(struct inode *inode, struct file *file) /* Activate */ ali_start(); - return nonseekable_open(inode, file); + return 0; } /*