netns xfrm: fix "ip xfrm state|policy count" misreport
[safe/jmp/linux-2.6] / drivers / watchdog / sc520_wdt.c
index 01de239..52b63f2 100644 (file)
@@ -1,8 +1,8 @@
 /*
  *     AMD Elan SC520 processor Watchdog Timer driver
  *
- *      Based on acquirewdt.c by Alan Cox,
- *           and sbc60xxwdt.c by Jakob Oestergaard <jakob@unthought.net>
+ *     Based on acquirewdt.c by Alan Cox,
+ *          and sbc60xxwdt.c by Jakob Oestergaard <jakob@unthought.net>
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
@@ -11,7 +11,7 @@
  *
  *     The authors do NOT admit liability nor provide warranty for
  *     any of this software. This material is provided "AS-IS" in
- *      the hope that it may be useful for others.
+ *     the hope that it may be useful for others.
  *
  *     (c) Copyright 2001    Scott Jennings <linuxdrivers@oro.net>
  *           9/27 - 2001      [Initial release]
@@ -290,18 +290,12 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                .identity = "SC520",
        };
 
-       switch (cmd)
-       {
-       default:
-               return -ENOTTY;
+       switch (cmd) {
        case WDIOC_GETSUPPORT:
                return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
        case WDIOC_GETSTATUS:
        case WDIOC_GETBOOTSTATUS:
                return put_user(0, p);
-       case WDIOC_KEEPALIVE:
-               wdt_keepalive();
-               return 0;
        case WDIOC_SETOPTIONS:
        {
                int new_options, retval = -EINVAL;
@@ -321,6 +315,9 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
                return retval;
        }
+       case WDIOC_KEEPALIVE:
+               wdt_keepalive();
+               return 0;
        case WDIOC_SETTIMEOUT:
        {
                int new_timeout;
@@ -336,6 +333,8 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        }
        case WDIOC_GETTIMEOUT:
                return put_user(timeout, p);
+       default:
+               return -ENOTTY;
        }
 }
 
@@ -439,6 +438,7 @@ module_init(sc520_wdt_init);
 module_exit(sc520_wdt_unload);
 
 MODULE_AUTHOR("Scott and Bill Jennings");
-MODULE_DESCRIPTION("Driver for watchdog timer in AMD \"Elan\" SC520 uProcessor");
+MODULE_DESCRIPTION(
+       "Driver for watchdog timer in AMD \"Elan\" SC520 uProcessor");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);