X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fwatchdog%2Fpcwd_pci.c;fp=drivers%2Fchar%2Fwatchdog%2Fpcwd_pci.c;h=2451edbefece8ab448a5ece121a1a35ee70f87fc;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=21ed0c5e1790c954080b192e3a27fee954627df8;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/drivers/char/watchdog/pcwd_pci.c b/drivers/char/watchdog/pcwd_pci.c index 21ed0c5e1..2451edbef 100644 --- a/drivers/char/watchdog/pcwd_pci.c +++ b/drivers/char/watchdog/pcwd_pci.c @@ -21,7 +21,7 @@ */ /* - * A bells and whistles driver is available from: + * A bells and whistles driver is available from: * http://www.kernel.org/pub/linux/kernel/people/wim/pcwd/pcwd_pci/ * * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/ @@ -31,6 +31,7 @@ * Includes, defines, variables, module parameters, ... */ +#include /* For CONFIG_WATCHDOG_NOWAYOUT/... */ #include /* For module specific items */ #include /* For new moduleparam's */ #include /* For standard types (like size_t) */ @@ -389,24 +390,6 @@ static int pcipcwd_get_temperature(int *temperature) return 0; } -static int pcipcwd_get_timeleft(int *time_left) -{ - int msb; - int lsb; - - /* Read the time that's left before rebooting */ - /* Note: if the board is not yet armed then we will read 0xFFFF */ - send_command(CMD_READ_WATCHDOG_TIMEOUT, &msb, &lsb); - - *time_left = (msb << 8) + lsb; - - if (debug >= VERBOSE) - printk(KERN_DEBUG PFX "Time left before next reboot: %d\n", - *time_left); - - return 0; -} - /* * /dev/watchdog handling */ @@ -529,16 +512,6 @@ static int pcipcwd_ioctl(struct inode *inode, struct file *file, case WDIOC_GETTIMEOUT: return put_user(heartbeat, p); - case WDIOC_GETTIMELEFT: - { - int time_left; - - if (pcipcwd_get_timeleft(&time_left)) - return -EFAULT; - - return put_user(time_left, p); - } - default: return -ENOIOCTLCMD; } @@ -624,7 +597,7 @@ static int pcipcwd_notify_sys(struct notifier_block *this, unsigned long code, v * Kernel Interfaces */ -static const struct file_operations pcipcwd_fops = { +static struct file_operations pcipcwd_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = pcipcwd_write, @@ -639,7 +612,7 @@ static struct miscdevice pcipcwd_miscdev = { .fops = &pcipcwd_fops, }; -static const struct file_operations pcipcwd_temp_fops = { +static struct file_operations pcipcwd_temp_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = pcipcwd_temp_read,