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/w83697hf_wdt.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/w83697hf_wdt.c')
-rw-r--r-- | drivers/watchdog/w83697hf_wdt.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/watchdog/w83697hf_wdt.c b/drivers/watchdog/w83697hf_wdt.c index 06ddd38675bd..12bd6618ed5e 100644 --- a/drivers/watchdog/w83697hf_wdt.c +++ b/drivers/watchdog/w83697hf_wdt.c | |||
@@ -251,21 +251,6 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
251 | case WDIOC_GETBOOTSTATUS: | 251 | case WDIOC_GETBOOTSTATUS: |
252 | return put_user(0, p); | 252 | return put_user(0, p); |
253 | 253 | ||
254 | case WDIOC_KEEPALIVE: | ||
255 | wdt_ping(); | ||
256 | break; | ||
257 | |||
258 | case WDIOC_SETTIMEOUT: | ||
259 | if (get_user(new_timeout, p)) | ||
260 | return -EFAULT; | ||
261 | if (wdt_set_heartbeat(new_timeout)) | ||
262 | return -EINVAL; | ||
263 | wdt_ping(); | ||
264 | /* Fall */ | ||
265 | |||
266 | case WDIOC_GETTIMEOUT: | ||
267 | return put_user(timeout, p); | ||
268 | |||
269 | case WDIOC_SETOPTIONS: | 254 | case WDIOC_SETOPTIONS: |
270 | { | 255 | { |
271 | int options, retval = -EINVAL; | 256 | int options, retval = -EINVAL; |
@@ -286,6 +271,21 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
286 | return retval; | 271 | return retval; |
287 | } | 272 | } |
288 | 273 | ||
274 | case WDIOC_KEEPALIVE: | ||
275 | wdt_ping(); | ||
276 | break; | ||
277 | |||
278 | case WDIOC_SETTIMEOUT: | ||
279 | if (get_user(new_timeout, p)) | ||
280 | return -EFAULT; | ||
281 | if (wdt_set_heartbeat(new_timeout)) | ||
282 | return -EINVAL; | ||
283 | wdt_ping(); | ||
284 | /* Fall */ | ||
285 | |||
286 | case WDIOC_GETTIMEOUT: | ||
287 | return put_user(timeout, p); | ||
288 | |||
289 | default: | 289 | default: |
290 | return -ENOTTY; | 290 | return -ENOTTY; |
291 | } | 291 | } |