]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/watchdog/wdt_pci.c
PCI: add routines for debugging and handling lost interrupts
[linux-2.6-omap-h63xx.git] / drivers / watchdog / wdt_pci.c
index 078f37f803832a381d2a7aa796f5ba3465102fdf..ed02bdb38c09ed616973eb58eceeff87ae424efa 100644 (file)
@@ -44,6 +44,7 @@
 #include <linux/miscdevice.h>
 #include <linux/watchdog.h>
 #include <linux/ioport.h>
+#include <linux/delay.h>
 #include <linux/notifier.h>
 #include <linux/reboot.h>
 #include <linux/init.h>
@@ -380,7 +381,7 @@ static ssize_t wdtpci_write(struct file *file, const char __user *buf,
 
                        for (i = 0; i != count; i++) {
                                char c;
-                               if (get_user(c, buf+i))
+                               if (get_user(c, buf + i))
                                        return -EFAULT;
                                if (c == 'V')
                                        expect_close = 42;
@@ -427,8 +428,6 @@ static long wdtpci_ioctl(struct file *file, unsigned int cmd,
 #endif /* CONFIG_WDT_501_PCI */
 
        switch (cmd) {
-       default:
-               return -ENOTTY;
        case WDIOC_GETSUPPORT:
                return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
        case WDIOC_GETSTATUS:
@@ -448,7 +447,9 @@ static long wdtpci_ioctl(struct file *file, unsigned int cmd,
                /* Fall */
        case WDIOC_GETTIMEOUT:
                return put_user(heartbeat, p);
-               }
+       default:
+               return -ENOTTY;
+       }
 }
 
 /**