]> err.no Git - linux-2.6/blobdiff - drivers/watchdog/ib700wdt.c
[WATCHDOG] sbc8360.c - move stop code into a function
[linux-2.6] / drivers / watchdog / ib700wdt.c
index 805a54b02aa1641a801a17785c9e6c2c19c8457e..6aa914e5caf5bef6b9fd9b93d3a0c671b25722d4 100644 (file)
@@ -41,9 +41,9 @@
 #include <linux/spinlock.h>
 #include <linux/moduleparam.h>
 #include <linux/platform_device.h>
-
 #include <linux/io.h>
 #include <linux/uaccess.h>
+
 #include <asm/system.h>
 
 static struct platform_device *ibwdt_platform_device;
@@ -213,21 +213,6 @@ static long ibwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        case WDIOC_GETBOOTSTATUS:
                return put_user(0, p);
 
-       case WDIOC_KEEPALIVE:
-               ibwdt_ping();
-               break;
-
-       case WDIOC_SETTIMEOUT:
-               if (get_user(new_margin, p))
-                       return -EFAULT;
-               if (ibwdt_set_heartbeat(new_margin))
-                       return -EINVAL;
-               ibwdt_ping();
-               /* Fall */
-
-       case WDIOC_GETTIMEOUT:
-               return put_user(wd_times[wd_margin], p);
-
        case WDIOC_SETOPTIONS:
        {
                int options, retval = -EINVAL;
@@ -245,6 +230,21 @@ static long ibwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                }
                return retval;
        }
+       case WDIOC_KEEPALIVE:
+               ibwdt_ping();
+               break;
+
+       case WDIOC_SETTIMEOUT:
+               if (get_user(new_margin, p))
+                       return -EFAULT;
+               if (ibwdt_set_heartbeat(new_margin))
+                       return -EINVAL;
+               ibwdt_ping();
+               /* Fall */
+
+       case WDIOC_GETTIMEOUT:
+               return put_user(wd_times[wd_margin], p);
+
        default:
                return -ENOTTY;
        }