VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / char / watchdog / pcwd.c
index 295e114..88bdbda 100644 (file)
@@ -485,10 +485,6 @@ static int pcwd_ioctl(struct inode *inode, struct file *file,
 static ssize_t pcwd_write(struct file *file, const char __user *buf, size_t len,
                          loff_t *ppos)
 {
-       /*  Can't seek (pwrite) on this device  */
-       if (ppos != &file->f_pos)
-               return -ESPIPE;
-
        if (len) {
                if (!nowayout) {
                        size_t i;
@@ -523,7 +519,7 @@ static int pcwd_open(struct inode *inode, struct file *file)
        /* Activate */
        pcwd_start();
        pcwd_keepalive();
-       return(0);
+       return nonseekable_open(inode, file);
 }
 
 static int pcwd_close(struct inode *inode, struct file *file)
@@ -548,10 +544,6 @@ static ssize_t pcwd_temp_read(struct file *file, char __user *buf, size_t count,
 {
        int temperature;
 
-       /* Can't seek (pread) on this device */
-       if (ppos != &file->f_pos)
-               return -ESPIPE;
-
        if (pcwd_get_temperature(&temperature))
                return -EFAULT;
 
@@ -566,7 +558,7 @@ static int pcwd_temp_open(struct inode *inode, struct file *file)
        if (!supports_temp)
                return -ENODEV;
 
-       return 0;
+       return nonseekable_open(inode, file);
 }
 
 static int pcwd_temp_close(struct inode *inode, struct file *file)