summaryrefslogtreecommitdiff
path: root/drivers/watchdog/pcwd_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/pcwd_pci.c')
-rw-r--r--drivers/watchdog/pcwd_pci.c128
1 files changed, 64 insertions, 64 deletions
diff --git a/drivers/watchdog/pcwd_pci.c b/drivers/watchdog/pcwd_pci.c
index 67d90810c6e9..7f500ee4ee8a 100644
--- a/drivers/watchdog/pcwd_pci.c
+++ b/drivers/watchdog/pcwd_pci.c
@@ -470,90 +470,90 @@ static long pcipcwd_ioctl(struct file *file, unsigned int cmd,
};
switch (cmd) {
- case WDIOC_GETSUPPORT:
- return copy_to_user(argp, &ident,
- sizeof (ident)) ? -EFAULT : 0;
-
- case WDIOC_GETSTATUS:
- {
- int status;
- pcipcwd_get_status(&status);
- return put_user(status, p);
- }
+ case WDIOC_GETSUPPORT:
+ return copy_to_user(argp, &ident,
+ sizeof (ident)) ? -EFAULT : 0;
+
+ case WDIOC_GETSTATUS:
+ {
+ int status;
+ pcipcwd_get_status(&status);
+ return put_user(status, p);
+ }
- case WDIOC_GETBOOTSTATUS:
- return put_user(pcipcwd_private.boot_status, p);
+ case WDIOC_GETBOOTSTATUS:
+ return put_user(pcipcwd_private.boot_status, p);
- case WDIOC_GETTEMP:
- {
- int temperature;
+ case WDIOC_GETTEMP:
+ {
+ int temperature;
- if (pcipcwd_get_temperature(&temperature))
- return -EFAULT;
+ if (pcipcwd_get_temperature(&temperature))
+ return -EFAULT;
- return put_user(temperature, p);
- }
-
- case WDIOC_KEEPALIVE:
- pcipcwd_keepalive();
- return 0;
+ return put_user(temperature, p);
+ }
- case WDIOC_SETOPTIONS:
- {
- int new_options, retval = -EINVAL;
+ case WDIOC_KEEPALIVE:
+ pcipcwd_keepalive();
+ return 0;
- if (get_user (new_options, p))
- return -EFAULT;
+ case WDIOC_SETOPTIONS:
+ {
+ int new_options, retval = -EINVAL;
- if (new_options & WDIOS_DISABLECARD) {
- if (pcipcwd_stop())
- return -EIO;
- retval = 0;
- }
+ if (get_user (new_options, p))
+ return -EFAULT;
- if (new_options & WDIOS_ENABLECARD) {
- if (pcipcwd_start())
- return -EIO;
- retval = 0;
- }
+ if (new_options & WDIOS_DISABLECARD) {
+ if (pcipcwd_stop())
+ return -EIO;
+ retval = 0;
+ }
- if (new_options & WDIOS_TEMPPANIC) {
- temp_panic = 1;
- retval = 0;
- }
+ if (new_options & WDIOS_ENABLECARD) {
+ if (pcipcwd_start())
+ return -EIO;
+ retval = 0;
+ }
- return retval;
+ if (new_options & WDIOS_TEMPPANIC) {
+ temp_panic = 1;
+ retval = 0;
}
- case WDIOC_SETTIMEOUT:
- {
- int new_heartbeat;
+ return retval;
+ }
- if (get_user(new_heartbeat, p))
- return -EFAULT;
+ case WDIOC_SETTIMEOUT:
+ {
+ int new_heartbeat;
- if (pcipcwd_set_heartbeat(new_heartbeat))
- return -EINVAL;
+ if (get_user(new_heartbeat, p))
+ return -EFAULT;
- pcipcwd_keepalive();
- /* Fall */
- }
+ if (pcipcwd_set_heartbeat(new_heartbeat))
+ return -EINVAL;
- case WDIOC_GETTIMEOUT:
- return put_user(heartbeat, p);
+ pcipcwd_keepalive();
+ /* Fall */
+ }
- case WDIOC_GETTIMELEFT:
- {
- int time_left;
+ case WDIOC_GETTIMEOUT:
+ return put_user(heartbeat, p);
- if (pcipcwd_get_timeleft(&time_left))
- return -EFAULT;
+ case WDIOC_GETTIMELEFT:
+ {
+ int time_left;
- return put_user(time_left, p);
- }
+ if (pcipcwd_get_timeleft(&time_left))
+ return -EFAULT;
+
+ return put_user(time_left, p);
+ }
- default:
- return -ENOTTY;
+ default:
+ return -ENOTTY;
}
}