X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fwatchdog%2Fpcwd_usb.c;h=3fdfda9324fae46a3429f3191354ee4ffec4c2cf;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=b7ae73dcdd0823602e1c75983fdb7455f9a7a824;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c index b7ae73dcd..3fdfda932 100644 --- a/drivers/char/watchdog/pcwd_usb.c +++ b/drivers/char/watchdog/pcwd_usb.c @@ -24,6 +24,7 @@ * http://www.berkprod.com/ or http://www.pcwatchdog.com/ */ +#include #include #include #include @@ -316,19 +317,6 @@ static int usb_pcwd_get_temperature(struct usb_pcwd_private *usb_pcwd, int *temp return 0; } -static int usb_pcwd_get_timeleft(struct usb_pcwd_private *usb_pcwd, int *time_left) -{ - unsigned char msb, lsb; - - /* Read the time that's left before rebooting */ - /* Note: if the board is not yet armed then we will read 0xFFFF */ - usb_pcwd_send_command(usb_pcwd, CMD_READ_WATCHDOG_TIMEOUT, &msb, &lsb); - - *time_left = (msb << 8) + lsb; - - return 0; -} - /* * /dev/watchdog handling */ @@ -434,16 +422,6 @@ static int usb_pcwd_ioctl(struct inode *inode, struct file *file, case WDIOC_GETTIMEOUT: return put_user(heartbeat, p); - case WDIOC_GETTIMELEFT: - { - int time_left; - - if (usb_pcwd_get_timeleft(usb_pcwd_device, &time_left)) - return -EFAULT; - - return put_user(time_left, p); - } - default: return -ENOIOCTLCMD; } @@ -523,7 +501,7 @@ static int usb_pcwd_notify_sys(struct notifier_block *this, unsigned long code, * Kernel Interfaces */ -static const struct file_operations usb_pcwd_fops = { +static struct file_operations usb_pcwd_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = usb_pcwd_write, @@ -538,7 +516,7 @@ static struct miscdevice usb_pcwd_miscdev = { .fops = &usb_pcwd_fops, }; -static const struct file_operations usb_pcwd_temperature_fops = { +static struct file_operations usb_pcwd_temperature_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = usb_pcwd_temperature_read,