aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/wafer5823wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/wafer5823wdt.c')
-rw-r--r--drivers/watchdog/wafer5823wdt.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/watchdog/wafer5823wdt.c b/drivers/watchdog/wafer5823wdt.c
index 886cbbcf3eed..44e81f7d4322 100644
--- a/drivers/watchdog/wafer5823wdt.c
+++ b/drivers/watchdog/wafer5823wdt.c
@@ -145,22 +145,6 @@ static long wafwdt_ioctl(struct file *file, unsigned int cmd,
145 case WDIOC_GETBOOTSTATUS: 145 case WDIOC_GETBOOTSTATUS:
146 return put_user(0, p); 146 return put_user(0, p);
147 147
148 case WDIOC_KEEPALIVE:
149 wafwdt_ping();
150 break;
151
152 case WDIOC_SETTIMEOUT:
153 if (get_user(new_timeout, p))
154 return -EFAULT;
155 if ((new_timeout < 1) || (new_timeout > 255))
156 return -EINVAL;
157 timeout = new_timeout;
158 wafwdt_stop();
159 wafwdt_start();
160 /* Fall */
161 case WDIOC_GETTIMEOUT:
162 return put_user(timeout, p);
163
164 case WDIOC_SETOPTIONS: 148 case WDIOC_SETOPTIONS:
165 { 149 {
166 int options, retval = -EINVAL; 150 int options, retval = -EINVAL;
@@ -181,6 +165,22 @@ static long wafwdt_ioctl(struct file *file, unsigned int cmd,
181 return retval; 165 return retval;
182 } 166 }
183 167
168 case WDIOC_KEEPALIVE:
169 wafwdt_ping();
170 break;
171
172 case WDIOC_SETTIMEOUT:
173 if (get_user(new_timeout, p))
174 return -EFAULT;
175 if ((new_timeout < 1) || (new_timeout > 255))
176 return -EINVAL;
177 timeout = new_timeout;
178 wafwdt_stop();
179 wafwdt_start();
180 /* Fall */
181 case WDIOC_GETTIMEOUT:
182 return put_user(timeout, p);
183
184 default: 184 default:
185 return -ENOTTY; 185 return -ENOTTY;
186 } 186 }