]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/watchdog/bfin_wdt.c
Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux
[linux-2.6-omap-h63xx.git] / drivers / watchdog / bfin_wdt.c
index 2b92818cc66452806782daa89e05eab228aace17..067a57cb3f829baf263a9d92f8b345a566c639cc 100644 (file)
@@ -5,7 +5,7 @@
  * Originally based on softdog.c
  * Copyright 2006-2007 Analog Devices Inc.
  * Copyright 2006-2007 Michele d'Amico
- * Copyright 1996 Alan Cox <alan@redhat.com>
+ * Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  * Enter bugs at http://blackfin.uclinux.org/
  *
@@ -24,8 +24,8 @@
 #include <linux/reboot.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
-#include <asm/blackfin.h>
 #include <linux/uaccess.h>
+#include <asm/blackfin.h>
 
 #define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args)
 #define stampit() stamp("here i am")
@@ -265,20 +265,6 @@ static long bfin_wdt_ioctl(struct file *file,
        case WDIOC_GETSTATUS:
        case WDIOC_GETBOOTSTATUS:
                return put_user(!!(_bfin_swrst & SWRST_RESET_WDOG), p);
-       case WDIOC_KEEPALIVE:
-               bfin_wdt_keepalive();
-               return 0;
-       case WDIOC_SETTIMEOUT: {
-               int new_timeout;
-
-               if (get_user(new_timeout, p))
-                       return -EFAULT;
-               if (bfin_wdt_set_timeout(new_timeout))
-                       return -EINVAL;
-       }
-       /* Fall */
-       case WDIOC_GETTIMEOUT:
-               return put_user(timeout, p);
        case WDIOC_SETOPTIONS: {
                unsigned long flags;
                int options, ret = -EINVAL;
@@ -298,6 +284,20 @@ static long bfin_wdt_ioctl(struct file *file,
                spin_unlock_irqrestore(&bfin_wdt_spinlock, flags);
                return ret;
        }
+       case WDIOC_KEEPALIVE:
+               bfin_wdt_keepalive();
+               return 0;
+       case WDIOC_SETTIMEOUT: {
+               int new_timeout;
+
+               if (get_user(new_timeout, p))
+                       return -EFAULT;
+               if (bfin_wdt_set_timeout(new_timeout))
+                       return -EINVAL;
+       }
+       /* Fall */
+       case WDIOC_GETTIMEOUT:
+               return put_user(timeout, p);
        default:
                return -ENOTTY;
        }