Merge to Fedora Core 2 kernel-2.6.8-1.521
[linux-2.6.git] / drivers / char / watchdog / wdt_pci.c
index c63d17f..9d5b5f4 100644 (file)
@@ -333,10 +333,6 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 
 static ssize_t wdtpci_write(struct file *file, const char __user *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;
@@ -446,7 +442,7 @@ static int wdtpci_open(struct inode *inode, struct file *file)
         *      Activate
         */
        wdtpci_start();
-       return 0;
+       return nonseekable_open(inode, file);
 }
 
 /**
@@ -490,10 +486,6 @@ static ssize_t wdtpci_temp_read(struct file *file, char __user *buf, size_t coun
 {
        int temperature;
 
-       /*  Can't seek (pread) on this device  */
-       if (ptr != &file->f_pos)
-               return -ESPIPE;
-
        if (wdtpci_get_temperature(&temperature))
                return -EFAULT;
 
@@ -513,7 +505,7 @@ static ssize_t wdtpci_temp_read(struct file *file, char __user *buf, size_t coun
 
 static int wdtpci_temp_open(struct inode *inode, struct file *file)
 {
-       return 0;
+       return nonseekable_open(inode, file);
 }
 
 /**