aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/geodewdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/geodewdt.c')
-rw-r--r--drivers/watchdog/geodewdt.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/watchdog/geodewdt.c b/drivers/watchdog/geodewdt.c
index 74c00698801d..04b861cfdf0c 100644
--- a/drivers/watchdog/geodewdt.c
+++ b/drivers/watchdog/geodewdt.c
@@ -159,22 +159,6 @@ geodewdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
159 case WDIOC_GETBOOTSTATUS: 159 case WDIOC_GETBOOTSTATUS:
160 return put_user(0, p); 160 return put_user(0, p);
161 161
162 case WDIOC_KEEPALIVE:
163 geodewdt_ping();
164 return 0;
165
166 case WDIOC_SETTIMEOUT:
167 if (get_user(interval, p))
168 return -EFAULT;
169
170 if (geodewdt_set_heartbeat(interval))
171 return -EINVAL;
172
173/* Fall through */
174
175 case WDIOC_GETTIMEOUT:
176 return put_user(timeout, p);
177
178 case WDIOC_SETOPTIONS: 162 case WDIOC_SETOPTIONS:
179 { 163 {
180 int options, ret = -EINVAL; 164 int options, ret = -EINVAL;
@@ -194,6 +178,20 @@ geodewdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
194 178
195 return ret; 179 return ret;
196 } 180 }
181 case WDIOC_KEEPALIVE:
182 geodewdt_ping();
183 return 0;
184
185 case WDIOC_SETTIMEOUT:
186 if (get_user(interval, p))
187 return -EFAULT;
188
189 if (geodewdt_set_heartbeat(interval))
190 return -EINVAL;
191 /* Fall through */
192 case WDIOC_GETTIMEOUT:
193 return put_user(timeout, p);
194
197 default: 195 default:
198 return -ENOTTY; 196 return -ENOTTY;
199 } 197 }