aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/wdt977.c
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2008-07-18 07:41:17 -0400
committerWim Van Sebroeck <wim@iguana.be>2008-08-06 09:21:09 -0400
commit0c06090c9472db0525cb6fe229c3bea33bbbbb3c (patch)
treeb01c21f6ef5649b6f0071dee4a55cb3ba236a7b8 /drivers/watchdog/wdt977.c
parent5eb82498e3a6da8a979c48945e3c1a85c10ccc25 (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/wdt977.c')
-rw-r--r--drivers/watchdog/wdt977.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/watchdog/wdt977.c b/drivers/watchdog/wdt977.c
index bdc28e522f03..60e28d49ff52 100644
--- a/drivers/watchdog/wdt977.c
+++ b/drivers/watchdog/wdt977.c
@@ -365,9 +365,6 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
365 uarg.i = (int __user *)arg; 365 uarg.i = (int __user *)arg;
366 366
367 switch (cmd) { 367 switch (cmd) {
368 default:
369 return -ENOTTY;
370
371 case WDIOC_GETSUPPORT: 368 case WDIOC_GETSUPPORT:
372 return copy_to_user(uarg.ident, &ident, 369 return copy_to_user(uarg.ident, &ident,
373 sizeof(ident)) ? -EFAULT : 0; 370 sizeof(ident)) ? -EFAULT : 0;
@@ -379,10 +376,6 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
379 case WDIOC_GETBOOTSTATUS: 376 case WDIOC_GETBOOTSTATUS:
380 return put_user(0, uarg.i); 377 return put_user(0, uarg.i);
381 378
382 case WDIOC_KEEPALIVE:
383 wdt977_keepalive();
384 return 0;
385
386 case WDIOC_SETOPTIONS: 379 case WDIOC_SETOPTIONS:
387 if (get_user(new_options, uarg.i)) 380 if (get_user(new_options, uarg.i))
388 return -EFAULT; 381 return -EFAULT;
@@ -399,6 +392,10 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
399 392
400 return retval; 393 return retval;
401 394
395 case WDIOC_KEEPALIVE:
396 wdt977_keepalive();
397 return 0;
398
402 case WDIOC_SETTIMEOUT: 399 case WDIOC_SETTIMEOUT:
403 if (get_user(new_timeout, uarg.i)) 400 if (get_user(new_timeout, uarg.i))
404 return -EFAULT; 401 return -EFAULT;
@@ -412,6 +409,9 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
412 case WDIOC_GETTIMEOUT: 409 case WDIOC_GETTIMEOUT:
413 return put_user(timeout, uarg.i); 410 return put_user(timeout, uarg.i);
414 411
412 default:
413 return -ENOTTY;
414
415 } 415 }
416} 416}
417 417