aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/ib700wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/ib700wdt.c')
-rw-r--r--drivers/watchdog/ib700wdt.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/watchdog/ib700wdt.c b/drivers/watchdog/ib700wdt.c
index 9eb9537c370e..6aa914e5caf5 100644
--- a/drivers/watchdog/ib700wdt.c
+++ b/drivers/watchdog/ib700wdt.c
@@ -213,21 +213,6 @@ static long ibwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
213 case WDIOC_GETBOOTSTATUS: 213 case WDIOC_GETBOOTSTATUS:
214 return put_user(0, p); 214 return put_user(0, p);
215 215
216 case WDIOC_KEEPALIVE:
217 ibwdt_ping();
218 break;
219
220 case WDIOC_SETTIMEOUT:
221 if (get_user(new_margin, p))
222 return -EFAULT;
223 if (ibwdt_set_heartbeat(new_margin))
224 return -EINVAL;
225 ibwdt_ping();
226 /* Fall */
227
228 case WDIOC_GETTIMEOUT:
229 return put_user(wd_times[wd_margin], p);
230
231 case WDIOC_SETOPTIONS: 216 case WDIOC_SETOPTIONS:
232 { 217 {
233 int options, retval = -EINVAL; 218 int options, retval = -EINVAL;
@@ -245,6 +230,21 @@ static long ibwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
245 } 230 }
246 return retval; 231 return retval;
247 } 232 }
233 case WDIOC_KEEPALIVE:
234 ibwdt_ping();
235 break;
236
237 case WDIOC_SETTIMEOUT:
238 if (get_user(new_margin, p))
239 return -EFAULT;
240 if (ibwdt_set_heartbeat(new_margin))
241 return -EINVAL;
242 ibwdt_ping();
243 /* Fall */
244
245 case WDIOC_GETTIMEOUT:
246 return put_user(wd_times[wd_margin], p);
247
248 default: 248 default:
249 return -ENOTTY; 249 return -ENOTTY;
250 } 250 }