summaryrefslogtreecommitdiff
path: root/drivers/watchdog/advantechwdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/advantechwdt.c')
-rw-r--r--drivers/watchdog/advantechwdt.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/watchdog/advantechwdt.c b/drivers/watchdog/advantechwdt.c
index e6bf8d2d3d30..bfec16600475 100644
--- a/drivers/watchdog/advantechwdt.c
+++ b/drivers/watchdog/advantechwdt.c
@@ -152,19 +152,6 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case WDIOC_GETBOOTSTATUS:
return put_user(0, p);
- case WDIOC_KEEPALIVE:
- advwdt_ping();
- break;
-
- case WDIOC_SETTIMEOUT:
- if (get_user(new_timeout, p))
- return -EFAULT;
- if (advwdt_set_heartbeat(new_timeout))
- return -EINVAL;
- advwdt_ping();
- /* Fall */
- case WDIOC_GETTIMEOUT:
- return put_user(timeout, p);
case WDIOC_SETOPTIONS:
{
int options, retval = -EINVAL;
@@ -181,6 +168,19 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
}
return retval;
}
+ case WDIOC_KEEPALIVE:
+ advwdt_ping();
+ break;
+
+ case WDIOC_SETTIMEOUT:
+ if (get_user(new_timeout, p))
+ return -EFAULT;
+ if (advwdt_set_heartbeat(new_timeout))
+ return -EINVAL;
+ advwdt_ping();
+ /* Fall */
+ case WDIOC_GETTIMEOUT:
+ return put_user(timeout, p);
default:
return -ENOTTY;
}