Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / char / watchdog / pcwd_usb.c
index b7ae73d..3fdfda9 100644 (file)
@@ -24,6 +24,7 @@
  *     http://www.berkprod.com/ or http://www.pcwatchdog.com/
  */
 
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/init.h>
@@ -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,