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 / eurotechwdt.c
index 01df656..25c2f25 100644 (file)
@@ -72,12 +72,7 @@ static char *ev = "int";
 
 #define WDT_TIMEOUT            60                /* 1 minute */
 
-#ifdef CONFIG_WATCHDOG_NOWAYOUT
-static int nowayout = 1;
-#else
-static int nowayout = 0;
-#endif
-
+static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
 MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
 
@@ -167,7 +162,7 @@ static irqreturn_t eurwdt_interrupt(int irq, void *dev_id, struct pt_regs *regs)
        printk(KERN_CRIT "Would Reboot.\n");
 #else
        printk(KERN_CRIT "Initiating system reboot.\n");
-       machine_restart(NULL);
+       emergency_restart();
 #endif
        return IRQ_HANDLED;
 }
@@ -199,10 +194,6 @@ static void eurwdt_ping(void)
 static ssize_t eurwdt_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;
@@ -310,7 +301,7 @@ static int eurwdt_open(struct inode *inode, struct file *file)
        eurwdt_timeout = WDT_TIMEOUT;   /* initial timeout */
        /* Activate the WDT */
        eurwdt_activate_timer();
-       return 0;
+       return nonseekable_open(inode, file);
 }
 
 /**