V4L/DVB (9135): cx88 Dvico FusionHDTV Pro
[safe/jmp/linux-2.6] / drivers / watchdog / w83627hf_wdt.c
index 70c843f..69396ad 100644 (file)
@@ -180,7 +180,7 @@ static ssize_t wdt_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;
@@ -211,18 +211,6 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        case WDIOC_GETSTATUS:
        case WDIOC_GETBOOTSTATUS:
                return put_user(0, p);
-       case WDIOC_KEEPALIVE:
-               wdt_ping();
-               break;
-       case WDIOC_SETTIMEOUT:
-               if (get_user(new_timeout, p))
-                       return -EFAULT;
-               if (wdt_set_heartbeat(new_timeout))
-                       return -EINVAL;
-               wdt_ping();
-               /* Fall */
-       case WDIOC_GETTIMEOUT:
-               return put_user(timeout, p);
        case WDIOC_SETOPTIONS:
        {
                int options, retval = -EINVAL;
@@ -239,6 +227,18 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                }
                return retval;
        }
+       case WDIOC_KEEPALIVE:
+               wdt_ping();
+               break;
+       case WDIOC_SETTIMEOUT:
+               if (get_user(new_timeout, p))
+                       return -EFAULT;
+               if (wdt_set_heartbeat(new_timeout))
+                       return -EINVAL;
+               wdt_ping();
+               /* Fall */
+       case WDIOC_GETTIMEOUT:
+               return put_user(timeout, p);
        default:
                return -ENOTTY;
        }
@@ -278,10 +278,9 @@ static int wdt_close(struct inode *inode, struct file *file)
 static int wdt_notify_sys(struct notifier_block *this, unsigned long code,
        void *unused)
 {
-       if (code == SYS_DOWN || code == SYS_HALT) {
-               /* Turn the WDT off */
-               wdt_disable();
-       }
+       if (code == SYS_DOWN || code == SYS_HALT)
+               wdt_disable();  /* Turn the WDT off */
+
        return NOTIFY_DONE;
 }