Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / drivers / char / watchdog / wdt285.c
index b61d9e1..6555fb8 100644 (file)
@@ -97,6 +97,7 @@ static int watchdog_open(struct inode *inode, struct file *file)
 
        ret = 0;
 #endif
+       nonseekable_open(inode, file);
        return ret;
 }
 
@@ -117,10 +118,6 @@ static int watchdog_release(struct inode *inode, struct file *file)
 static ssize_t
 watchdog_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.
         */
@@ -181,8 +178,9 @@ watchdog_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
        return ret;
 }
 
-static struct file_operations watchdog_fops = {
+static const struct file_operations watchdog_fops = {
        .owner          = THIS_MODULE,
+       .llseek         = no_llseek,
        .write          = watchdog_write,
        .ioctl          = watchdog_ioctl,
        .open           = watchdog_open,