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/pc87413_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/pc87413_wdt.c')
-rw-r--r-- | drivers/watchdog/pc87413_wdt.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/watchdog/pc87413_wdt.c b/drivers/watchdog/pc87413_wdt.c index 326f2d2ded3b..5fc7f1349950 100644 --- a/drivers/watchdog/pc87413_wdt.c +++ b/drivers/watchdog/pc87413_wdt.c | |||
@@ -426,6 +426,21 @@ static long pc87413_ioctl(struct file *file, unsigned int cmd, | |||
426 | return put_user(pc87413_status(), uarg.i); | 426 | return put_user(pc87413_status(), uarg.i); |
427 | case WDIOC_GETBOOTSTATUS: | 427 | case WDIOC_GETBOOTSTATUS: |
428 | return put_user(0, uarg.i); | 428 | return put_user(0, uarg.i); |
429 | case WDIOC_SETOPTIONS: | ||
430 | { | ||
431 | int options, retval = -EINVAL; | ||
432 | if (get_user(options, uarg.i)) | ||
433 | return -EFAULT; | ||
434 | if (options & WDIOS_DISABLECARD) { | ||
435 | pc87413_disable(); | ||
436 | retval = 0; | ||
437 | } | ||
438 | if (options & WDIOS_ENABLECARD) { | ||
439 | pc87413_enable(); | ||
440 | retval = 0; | ||
441 | } | ||
442 | return retval; | ||
443 | } | ||
429 | case WDIOC_KEEPALIVE: | 444 | case WDIOC_KEEPALIVE: |
430 | pc87413_refresh(); | 445 | pc87413_refresh(); |
431 | #ifdef DEBUG | 446 | #ifdef DEBUG |
@@ -445,21 +460,6 @@ static long pc87413_ioctl(struct file *file, unsigned int cmd, | |||
445 | case WDIOC_GETTIMEOUT: | 460 | case WDIOC_GETTIMEOUT: |
446 | new_timeout = timeout * 60; | 461 | new_timeout = timeout * 60; |
447 | return put_user(new_timeout, uarg.i); | 462 | return put_user(new_timeout, uarg.i); |
448 | case WDIOC_SETOPTIONS: | ||
449 | { | ||
450 | int options, retval = -EINVAL; | ||
451 | if (get_user(options, uarg.i)) | ||
452 | return -EFAULT; | ||
453 | if (options & WDIOS_DISABLECARD) { | ||
454 | pc87413_disable(); | ||
455 | retval = 0; | ||
456 | } | ||
457 | if (options & WDIOS_ENABLECARD) { | ||
458 | pc87413_enable(); | ||
459 | retval = 0; | ||
460 | } | ||
461 | return retval; | ||
462 | } | ||
463 | default: | 463 | default: |
464 | return -ENOTTY; | 464 | return -ENOTTY; |
465 | } | 465 | } |