X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fwatchdog%2Fwdt977.c;h=60e28d49ff527a3644fbda4eed4826b797f4aa7b;hb=a06dee41a31bff488a261dfc542776ffd2f24ff1;hp=bdc28e522f0347f055649d11a4711ad8d1b8cab7;hpb=f2b79c6ede54cf07355ac8d8f3044d682cd0c5ca;p=linux-2.6 diff --git a/drivers/watchdog/wdt977.c b/drivers/watchdog/wdt977.c index bdc28e522f..60e28d49ff 100644 --- a/drivers/watchdog/wdt977.c +++ b/drivers/watchdog/wdt977.c @@ -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; + } }