This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / char / watchdog / shwdt.c
index 3bc9272..e4c235d 100644 (file)
@@ -209,7 +209,7 @@ static int sh_wdt_open(struct inode *inode, struct file *file)
 
        sh_wdt_start();
 
-       return nonseekable_open(inode, file);
+       return 0;
 }
 
 /**
@@ -248,6 +248,10 @@ static int sh_wdt_close(struct inode *inode, struct file *file)
 static ssize_t sh_wdt_write(struct file *file, const char *buf,
                            size_t count, loff_t *ppos)
 {
+       /* Can't seek (pwrite) on this device */
+       if (ppos != &file->f_pos)
+               return -ESPIPE;
+
        if (count) {
                if (!nowayout) {
                        size_t i;