]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/watchdog/wdt977.c
leds: Simplify logic in leds-ams-delta
[linux-2.6-omap-h63xx.git] / drivers / watchdog / wdt977.c
index bdc28e522f0347f055649d11a4711ad8d1b8cab7..60e28d49ff527a3644fbda4eed4826b797f4aa7b 100644 (file)
@@ -365,9 +365,6 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
        uarg.i = (int __user *)arg;
 
        switch (cmd) {
-       default:
-               return -ENOTTY;
-
        case WDIOC_GETSUPPORT:
                return copy_to_user(uarg.ident, &ident,
                        sizeof(ident)) ? -EFAULT : 0;
@@ -379,10 +376,6 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
        case WDIOC_GETBOOTSTATUS:
                return put_user(0, uarg.i);
 
-       case WDIOC_KEEPALIVE:
-               wdt977_keepalive();
-               return 0;
-
        case WDIOC_SETOPTIONS:
                if (get_user(new_options, uarg.i))
                        return -EFAULT;
@@ -399,6 +392,10 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
 
                return retval;
 
+       case WDIOC_KEEPALIVE:
+               wdt977_keepalive();
+               return 0;
+
        case WDIOC_SETTIMEOUT:
                if (get_user(new_timeout, uarg.i))
                        return -EFAULT;
@@ -412,6 +409,9 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
        case WDIOC_GETTIMEOUT:
                return put_user(timeout, uarg.i);
 
+       default:
+               return -ENOTTY;
+
        }
 }