aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/w83877f_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/w83877f_wdt.c')
-rw-r--r--drivers/watchdog/w83877f_wdt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/watchdog/w83877f_wdt.c b/drivers/watchdog/w83877f_wdt.c
index 75b546d7d8c2..24587d2060c4 100644
--- a/drivers/watchdog/w83877f_wdt.c
+++ b/drivers/watchdog/w83877f_wdt.c
@@ -254,16 +254,11 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
254 }; 254 };
255 255
256 switch (cmd) { 256 switch (cmd) {
257 default:
258 return -ENOTTY;
259 case WDIOC_GETSUPPORT: 257 case WDIOC_GETSUPPORT:
260 return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; 258 return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
261 case WDIOC_GETSTATUS: 259 case WDIOC_GETSTATUS:
262 case WDIOC_GETBOOTSTATUS: 260 case WDIOC_GETBOOTSTATUS:
263 return put_user(0, p); 261 return put_user(0, p);
264 case WDIOC_KEEPALIVE:
265 wdt_keepalive();
266 return 0;
267 case WDIOC_SETOPTIONS: 262 case WDIOC_SETOPTIONS:
268 { 263 {
269 int new_options, retval = -EINVAL; 264 int new_options, retval = -EINVAL;
@@ -283,6 +278,9 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
283 278
284 return retval; 279 return retval;
285 } 280 }
281 case WDIOC_KEEPALIVE:
282 wdt_keepalive();
283 return 0;
286 case WDIOC_SETTIMEOUT: 284 case WDIOC_SETTIMEOUT:
287 { 285 {
288 int new_timeout; 286 int new_timeout;
@@ -300,6 +298,8 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
300 } 298 }
301 case WDIOC_GETTIMEOUT: 299 case WDIOC_GETTIMEOUT:
302 return put_user(timeout, p); 300 return put_user(timeout, p);
301 default:
302 return -ENOTTY;
303 } 303 }
304} 304}
305 305