aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/pcwd_usb.c
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2008-07-17 14:08:47 -0400
committerWim Van Sebroeck <wim@iguana.be>2008-08-06 09:21:05 -0400
commit5eb82498e3a6da8a979c48945e3c1a85c10ccc25 (patch)
treebc16dd667fb48b83a5009407049c6ffb5a296cbc /drivers/watchdog/pcwd_usb.c
parent0d7b101404f7bedcf3f448c1667c3744551cd9ee (diff)
[WATCHDOG] Coding style - Indentation - part 1
This brings the watchdog drivers into line with coding style. This patch takes cares of the indentation as described in chapter 1: The preferred way to ease multiple indentation levels in a switch statement is to align the "switch" and its subordinate "case" labels in the same column instead of "double-indenting" the "case" labels. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/pcwd_usb.c')
-rw-r--r--drivers/watchdog/pcwd_usb.c104
1 files changed, 52 insertions, 52 deletions
diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c
index bc399cf65cf7..8194435052c8 100644
--- a/drivers/watchdog/pcwd_usb.c
+++ b/drivers/watchdog/pcwd_usb.c
@@ -382,77 +382,77 @@ static long usb_pcwd_ioctl(struct file *file, unsigned int cmd,
382 }; 382 };
383 383
384 switch (cmd) { 384 switch (cmd) {
385 case WDIOC_GETSUPPORT: 385 case WDIOC_GETSUPPORT:
386 return copy_to_user(argp, &ident, 386 return copy_to_user(argp, &ident,
387 sizeof (ident)) ? -EFAULT : 0; 387 sizeof (ident)) ? -EFAULT : 0;
388 388
389 case WDIOC_GETSTATUS: 389 case WDIOC_GETSTATUS:
390 case WDIOC_GETBOOTSTATUS: 390 case WDIOC_GETBOOTSTATUS:
391 return put_user(0, p); 391 return put_user(0, p);
392 392
393 case WDIOC_GETTEMP: 393 case WDIOC_GETTEMP:
394 { 394 {
395 int temperature; 395 int temperature;
396 396
397 if (usb_pcwd_get_temperature(usb_pcwd_device, &temperature)) 397 if (usb_pcwd_get_temperature(usb_pcwd_device, &temperature))
398 return -EFAULT; 398 return -EFAULT;
399 399
400 return put_user(temperature, p); 400 return put_user(temperature, p);
401 } 401 }
402 402
403 case WDIOC_KEEPALIVE: 403 case WDIOC_KEEPALIVE:
404 usb_pcwd_keepalive(usb_pcwd_device); 404 usb_pcwd_keepalive(usb_pcwd_device);
405 return 0; 405 return 0;
406 406
407 case WDIOC_SETOPTIONS: 407 case WDIOC_SETOPTIONS:
408 { 408 {
409 int new_options, retval = -EINVAL; 409 int new_options, retval = -EINVAL;
410 410
411 if (get_user (new_options, p)) 411 if (get_user (new_options, p))
412 return -EFAULT; 412 return -EFAULT;
413 413
414 if (new_options & WDIOS_DISABLECARD) { 414 if (new_options & WDIOS_DISABLECARD) {
415 usb_pcwd_stop(usb_pcwd_device); 415 usb_pcwd_stop(usb_pcwd_device);
416 retval = 0; 416 retval = 0;
417 } 417 }
418
419 if (new_options & WDIOS_ENABLECARD) {
420 usb_pcwd_start(usb_pcwd_device);
421 retval = 0;
422 }
423 418
424 return retval; 419 if (new_options & WDIOS_ENABLECARD) {
420 usb_pcwd_start(usb_pcwd_device);
421 retval = 0;
425 } 422 }
426 423
427 case WDIOC_SETTIMEOUT: 424 return retval;
428 { 425 }
429 int new_heartbeat;
430 426
431 if (get_user(new_heartbeat, p)) 427 case WDIOC_SETTIMEOUT:
432 return -EFAULT; 428 {
429 int new_heartbeat;
433 430
434 if (usb_pcwd_set_heartbeat(usb_pcwd_device, new_heartbeat)) 431 if (get_user(new_heartbeat, p))
435 return -EINVAL; 432 return -EFAULT;
436 433
437 usb_pcwd_keepalive(usb_pcwd_device); 434 if (usb_pcwd_set_heartbeat(usb_pcwd_device, new_heartbeat))
438 /* Fall */ 435 return -EINVAL;
439 }
440 436
441 case WDIOC_GETTIMEOUT: 437 usb_pcwd_keepalive(usb_pcwd_device);
442 return put_user(heartbeat, p); 438 /* Fall */
439 }
443 440
444 case WDIOC_GETTIMELEFT: 441 case WDIOC_GETTIMEOUT:
445 { 442 return put_user(heartbeat, p);
446 int time_left;
447 443
448 if (usb_pcwd_get_timeleft(usb_pcwd_device, &time_left)) 444 case WDIOC_GETTIMELEFT:
449 return -EFAULT; 445 {
446 int time_left;
450 447
451 return put_user(time_left, p); 448 if (usb_pcwd_get_timeleft(usb_pcwd_device, &time_left))
452 } 449 return -EFAULT;
450
451 return put_user(time_left, p);
452 }
453 453
454 default: 454 default:
455 return -ENOTTY; 455 return -ENOTTY;
456 } 456 }
457} 457}
458 458