diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2008-07-18 07:41:17 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2008-08-06 09:21:09 -0400 |
commit | 0c06090c9472db0525cb6fe229c3bea33bbbbb3c (patch) | |
tree | b01c21f6ef5649b6f0071dee4a55cb3ba236a7b8 /drivers/watchdog/ib700wdt.c | |
parent | 5eb82498e3a6da8a979c48945e3c1a85c10ccc25 (diff) |
[WATCHDOG] Coding style - Indentation - part 2
This brings the watchdog drivers into line with coding style.
This patch takes cares of the indentation as described in chapter 1.
Main changes:
* Re-structure the ioctl switch call for all drivers as follows:
switch (cmd) {
case WDIOC_GETSUPPORT:
case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
case WDIOC_GETTEMP:
case WDIOC_SETOPTIONS:
case WDIOC_KEEPALIVE:
case WDIOC_SETTIMEOUT:
case WDIOC_GETTIMEOUT:
case WDIOC_GETTIMELEFT:
default:
}
This to make the migration from the drivers to the uniform watchdog
device driver easier in the future.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/ib700wdt.c')
-rw-r--r-- | drivers/watchdog/ib700wdt.c | 30 |
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 | } |