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/w83877f_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/w83877f_wdt.c')
-rw-r--r-- | drivers/watchdog/w83877f_wdt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/watchdog/w83877f_wdt.c b/drivers/watchdog/w83877f_wdt.c index 75b546d7d8c2..24587d2060c4 100644 --- a/drivers/watchdog/w83877f_wdt.c +++ b/drivers/watchdog/w83877f_wdt.c | |||
@@ -254,16 +254,11 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
254 | }; | 254 | }; |
255 | 255 | ||
256 | switch (cmd) { | 256 | switch (cmd) { |
257 | default: | ||
258 | return -ENOTTY; | ||
259 | case WDIOC_GETSUPPORT: | 257 | case WDIOC_GETSUPPORT: |
260 | return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; | 258 | return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; |
261 | case WDIOC_GETSTATUS: | 259 | case WDIOC_GETSTATUS: |
262 | case WDIOC_GETBOOTSTATUS: | 260 | case WDIOC_GETBOOTSTATUS: |
263 | return put_user(0, p); | 261 | return put_user(0, p); |
264 | case WDIOC_KEEPALIVE: | ||
265 | wdt_keepalive(); | ||
266 | return 0; | ||
267 | case WDIOC_SETOPTIONS: | 262 | case WDIOC_SETOPTIONS: |
268 | { | 263 | { |
269 | int new_options, retval = -EINVAL; | 264 | int new_options, retval = -EINVAL; |
@@ -283,6 +278,9 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
283 | 278 | ||
284 | return retval; | 279 | return retval; |
285 | } | 280 | } |
281 | case WDIOC_KEEPALIVE: | ||
282 | wdt_keepalive(); | ||
283 | return 0; | ||
286 | case WDIOC_SETTIMEOUT: | 284 | case WDIOC_SETTIMEOUT: |
287 | { | 285 | { |
288 | int new_timeout; | 286 | int new_timeout; |
@@ -300,6 +298,8 @@ static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
300 | } | 298 | } |
301 | case WDIOC_GETTIMEOUT: | 299 | case WDIOC_GETTIMEOUT: |
302 | return put_user(timeout, p); | 300 | return put_user(timeout, p); |
301 | default: | ||
302 | return -ENOTTY; | ||
303 | } | 303 | } |
304 | } | 304 | } |
305 | 305 | ||