X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fwatchdog%2Findydog.c;h=23fc36473f341845681b890f0e25cba7a21f991d;hb=5d0dd51ddb446e7c058023420f5b7d4404501980;hp=4e9093b4af8d82bb2e20f9c37f5609a53d4fae8f;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/drivers/char/watchdog/indydog.c b/drivers/char/watchdog/indydog.c index 4e9093b4a..23fc36473 100644 --- a/drivers/char/watchdog/indydog.c +++ b/drivers/char/watchdog/indydog.c @@ -81,7 +81,7 @@ static int indydog_open(struct inode *inode, struct file *file) indydog_alive = 1; printk(KERN_INFO "Started watchdog timer.\n"); - return nonseekable_open(inode, file); + return 0; } static int indydog_release(struct inode *inode, struct file *file) @@ -98,6 +98,10 @@ static int indydog_release(struct inode *inode, struct file *file) static ssize_t indydog_write(struct file *file, const char *data, size_t len, loff_t *ppos) { + /* Can't seek (pwrite) on this device */ + if (ppos != &file->f_pos) + return -ESPIPE; + /* Refresh the timer. */ if (len) { indydog_ping();