Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / char / watchdog / shwdt.c
index ea14405..1f4cab5 100644 (file)
@@ -64,7 +64,6 @@
  */
 static int clock_division_ratio = WTCSR_CKS_4096;
 
-#define msecs_to_jiffies(msecs)        (jiffies + (HZ * msecs + 9999) / 10000)
 #define next_ping_period(cks)  msecs_to_jiffies(cks - 4)
 
 static unsigned long shwdt_is_open;
@@ -76,11 +75,7 @@ static unsigned long next_heartbeat;
 #define WATCHDOG_HEARTBEAT 30                  /* 30 sec default heartbeat */
 static int heartbeat = WATCHDOG_HEARTBEAT;     /* in seconds */
 
-#ifdef CONFIG_WATCHDOG_NOWAYOUT
-static int nowayout = 1;
-#else
-static int nowayout = 0;
-#endif
+static int nowayout = WATCHDOG_NOWAYOUT;
 
 /**
  *     sh_wdt_start - Start the Watchdog
@@ -210,7 +205,7 @@ static int sh_wdt_open(struct inode *inode, struct file *file)
 
        sh_wdt_start();
 
-       return 0;
+       return nonseekable_open(inode, file);
 }
 
 /**
@@ -249,10 +244,6 @@ 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;