]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/watchdog/cpu5wdt.c
autofs4: collect version check return
[linux-2.6-omap-h63xx.git] / drivers / watchdog / cpu5wdt.c
index ec324e5e1c99d3616db61b76276cebce67ad83f1..71f6d7eec9a83c38fe50ae4b65d75456b1dbc4c7 100644 (file)
@@ -160,8 +160,9 @@ static long cpu5wdt_ioctl(struct file *file, unsigned int cmd,
        };
 
        switch (cmd) {
-       case WDIOC_KEEPALIVE:
-               cpu5wdt_reset();
+       case WDIOC_GETSUPPORT:
+               if (copy_to_user(argp, &ident, sizeof(ident)))
+                       return -EFAULT;
                break;
        case WDIOC_GETSTATUS:
                value = inb(port + CPU5WDT_STATUS_REG);
@@ -169,10 +170,6 @@ static long cpu5wdt_ioctl(struct file *file, unsigned int cmd,
                return put_user(value, p);
        case WDIOC_GETBOOTSTATUS:
                return put_user(0, p);
-       case WDIOC_GETSUPPORT:
-               if (copy_to_user(argp, &ident, sizeof(ident)))
-                       return -EFAULT;
-               break;
        case WDIOC_SETOPTIONS:
                if (get_user(value, p))
                        return -EFAULT;
@@ -181,6 +178,9 @@ static long cpu5wdt_ioctl(struct file *file, unsigned int cmd,
                if (value & WDIOS_DISABLECARD)
                        cpu5wdt_stop();
                break;
+       case WDIOC_KEEPALIVE:
+               cpu5wdt_reset();
+               break;
        default:
                return -ENOTTY;
        }