diff options
Diffstat (limited to 'drivers/watchdog/advantechwdt.c')
-rw-r--r-- | drivers/watchdog/advantechwdt.c | 26 |
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) | |||
152 | case WDIOC_GETBOOTSTATUS: | 152 | case WDIOC_GETBOOTSTATUS: |
153 | return put_user(0, p); | 153 | return put_user(0, p); |
154 | 154 | ||
155 | case WDIOC_KEEPALIVE: | ||
156 | advwdt_ping(); | ||
157 | break; | ||
158 | |||
159 | case WDIOC_SETTIMEOUT: | ||
160 | if (get_user(new_timeout, p)) | ||
161 | return -EFAULT; | ||
162 | if (advwdt_set_heartbeat(new_timeout)) | ||
163 | return -EINVAL; | ||
164 | advwdt_ping(); | ||
165 | /* Fall */ | ||
166 | case WDIOC_GETTIMEOUT: | ||
167 | return put_user(timeout, p); | ||
168 | case WDIOC_SETOPTIONS: | 155 | case WDIOC_SETOPTIONS: |
169 | { | 156 | { |
170 | int options, retval = -EINVAL; | 157 | int options, retval = -EINVAL; |
@@ -181,6 +168,19 @@ static long advwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
181 | } | 168 | } |
182 | return retval; | 169 | return retval; |
183 | } | 170 | } |
171 | case WDIOC_KEEPALIVE: | ||
172 | advwdt_ping(); | ||
173 | break; | ||
174 | |||
175 | case WDIOC_SETTIMEOUT: | ||
176 | if (get_user(new_timeout, p)) | ||
177 | return -EFAULT; | ||
178 | if (advwdt_set_heartbeat(new_timeout)) | ||
179 | return -EINVAL; | ||
180 | advwdt_ping(); | ||
181 | /* Fall */ | ||
182 | case WDIOC_GETTIMEOUT: | ||
183 | return put_user(timeout, p); | ||
184 | default: | 184 | default: |
185 | return -ENOTTY; | 185 | return -ENOTTY; |
186 | } | 186 | } |