diff options
Diffstat (limited to 'drivers/watchdog/w83627hf_wdt.c')
-rw-r--r-- | drivers/watchdog/w83627hf_wdt.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c index 70c843f4201a..59507f609996 100644 --- a/drivers/watchdog/w83627hf_wdt.c +++ b/drivers/watchdog/w83627hf_wdt.c | |||
@@ -211,18 +211,6 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
211 | case WDIOC_GETSTATUS: | 211 | case WDIOC_GETSTATUS: |
212 | case WDIOC_GETBOOTSTATUS: | 212 | case WDIOC_GETBOOTSTATUS: |
213 | return put_user(0, p); | 213 | return put_user(0, p); |
214 | case WDIOC_KEEPALIVE: | ||
215 | wdt_ping(); | ||
216 | break; | ||
217 | case WDIOC_SETTIMEOUT: | ||
218 | if (get_user(new_timeout, p)) | ||
219 | return -EFAULT; | ||
220 | if (wdt_set_heartbeat(new_timeout)) | ||
221 | return -EINVAL; | ||
222 | wdt_ping(); | ||
223 | /* Fall */ | ||
224 | case WDIOC_GETTIMEOUT: | ||
225 | return put_user(timeout, p); | ||
226 | case WDIOC_SETOPTIONS: | 214 | case WDIOC_SETOPTIONS: |
227 | { | 215 | { |
228 | int options, retval = -EINVAL; | 216 | int options, retval = -EINVAL; |
@@ -239,6 +227,18 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
239 | } | 227 | } |
240 | return retval; | 228 | return retval; |
241 | } | 229 | } |
230 | case WDIOC_KEEPALIVE: | ||
231 | wdt_ping(); | ||
232 | break; | ||
233 | case WDIOC_SETTIMEOUT: | ||
234 | if (get_user(new_timeout, p)) | ||
235 | return -EFAULT; | ||
236 | if (wdt_set_heartbeat(new_timeout)) | ||
237 | return -EINVAL; | ||
238 | wdt_ping(); | ||
239 | /* Fall */ | ||
240 | case WDIOC_GETTIMEOUT: | ||
241 | return put_user(timeout, p); | ||
242 | default: | 242 | default: |
243 | return -ENOTTY; | 243 | return -ENOTTY; |
244 | } | 244 | } |