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/shwdt.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/shwdt.c')
-rw-r--r-- | drivers/watchdog/shwdt.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c index 60f0036aaca6..824125adf90a 100644 --- a/drivers/watchdog/shwdt.c +++ b/drivers/watchdog/shwdt.c | |||
@@ -351,20 +351,6 @@ static long sh_wdt_ioctl(struct file *file, unsigned int cmd, | |||
351 | case WDIOC_GETSTATUS: | 351 | case WDIOC_GETSTATUS: |
352 | case WDIOC_GETBOOTSTATUS: | 352 | case WDIOC_GETBOOTSTATUS: |
353 | return put_user(0, (int *)arg); | 353 | return put_user(0, (int *)arg); |
354 | case WDIOC_KEEPALIVE: | ||
355 | sh_wdt_keepalive(); | ||
356 | return 0; | ||
357 | case WDIOC_SETTIMEOUT: | ||
358 | if (get_user(new_heartbeat, (int *)arg)) | ||
359 | return -EFAULT; | ||
360 | |||
361 | if (sh_wdt_set_heartbeat(new_heartbeat)) | ||
362 | return -EINVAL; | ||
363 | |||
364 | sh_wdt_keepalive(); | ||
365 | /* Fall */ | ||
366 | case WDIOC_GETTIMEOUT: | ||
367 | return put_user(heartbeat, (int *)arg); | ||
368 | case WDIOC_SETOPTIONS: | 354 | case WDIOC_SETOPTIONS: |
369 | if (get_user(options, (int *)arg)) | 355 | if (get_user(options, (int *)arg)) |
370 | return -EFAULT; | 356 | return -EFAULT; |
@@ -380,6 +366,20 @@ static long sh_wdt_ioctl(struct file *file, unsigned int cmd, | |||
380 | } | 366 | } |
381 | 367 | ||
382 | return retval; | 368 | return retval; |
369 | case WDIOC_KEEPALIVE: | ||
370 | sh_wdt_keepalive(); | ||
371 | return 0; | ||
372 | case WDIOC_SETTIMEOUT: | ||
373 | if (get_user(new_heartbeat, (int *)arg)) | ||
374 | return -EFAULT; | ||
375 | |||
376 | if (sh_wdt_set_heartbeat(new_heartbeat)) | ||
377 | return -EINVAL; | ||
378 | |||
379 | sh_wdt_keepalive(); | ||
380 | /* Fall */ | ||
381 | case WDIOC_GETTIMEOUT: | ||
382 | return put_user(heartbeat, (int *)arg); | ||
383 | default: | 383 | default: |
384 | return -ENOTTY; | 384 | return -ENOTTY; |
385 | } | 385 | } |