netns xfrm: fix "ip xfrm state|policy count" misreport
[safe/jmp/linux-2.6] / drivers / watchdog / w83697hf_wdt.c
index 06ddd38..af08972 100644 (file)
@@ -12,8 +12,8 @@
  *
  *     (c) Copyright 2000-2001 Marek Michalkiewicz <marekm@linux.org.pl>
  *
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
@@ -218,7 +218,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;
@@ -251,21 +251,6 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        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;
@@ -286,6 +271,21 @@ 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;
        }
@@ -325,10 +325,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;
 }
 
@@ -414,7 +413,8 @@ static int __init wdt_init(void)
        w83697hf_init();
        if (early_disable) {
                if (wdt_running())
-                       printk (KERN_WARNING PFX "Stopping previously enabled watchdog until userland kicks in\n");
+                       printk(KERN_WARNING PFX "Stopping previously enabled "
+                                       "watchdog until userland kicks in\n");
                wdt_disable();
        }
 
@@ -463,6 +463,7 @@ module_init(wdt_init);
 module_exit(wdt_exit);
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Marcus Junker <junker@anduras.de>, Samuel Tardieu <sam@rfc1149.net>");
+MODULE_AUTHOR("Marcus Junker <junker@anduras.de>, "
+               "Samuel Tardieu <sam@rfc1149.net>");
 MODULE_DESCRIPTION("w83697hf/hg WDT driver");
 MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);