aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/sbc60xxwdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/sbc60xxwdt.c')
-rw-r--r--drivers/watchdog/sbc60xxwdt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/watchdog/sbc60xxwdt.c b/drivers/watchdog/sbc60xxwdt.c
index e284a5d4fb1b..e801cd46c647 100644
--- a/drivers/watchdog/sbc60xxwdt.c
+++ b/drivers/watchdog/sbc60xxwdt.c
@@ -237,16 +237,11 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
237 }; 237 };
238 238
239 switch (cmd) { 239 switch (cmd) {
240 default:
241 return -ENOTTY;
242 case WDIOC_GETSUPPORT: 240 case WDIOC_GETSUPPORT:
243 return copy_to_user(argp, &ident, sizeof(ident))? -EFAULT : 0; 241 return copy_to_user(argp, &ident, sizeof(ident))? -EFAULT : 0;
244 case WDIOC_GETSTATUS: 242 case WDIOC_GETSTATUS:
245 case WDIOC_GETBOOTSTATUS: 243 case WDIOC_GETBOOTSTATUS:
246 return put_user(0, p); 244 return put_user(0, p);
247 case WDIOC_KEEPALIVE:
248 wdt_keepalive();
249 return 0;
250 case WDIOC_SETOPTIONS: 245 case WDIOC_SETOPTIONS:
251 { 246 {
252 int new_options, retval = -EINVAL; 247 int new_options, retval = -EINVAL;
@@ -262,6 +257,9 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
262 } 257 }
263 return retval; 258 return retval;
264 } 259 }
260 case WDIOC_KEEPALIVE:
261 wdt_keepalive();
262 return 0;
265 case WDIOC_SETTIMEOUT: 263 case WDIOC_SETTIMEOUT:
266 { 264 {
267 int new_timeout; 265 int new_timeout;
@@ -277,6 +275,8 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
277 } 275 }
278 case WDIOC_GETTIMEOUT: 276 case WDIOC_GETTIMEOUT:
279 return put_user(timeout, p); 277 return put_user(timeout, p);
278 default:
279 return -ENOTTY;
280 } 280 }
281} 281}
282 282