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 / i8xx_tco.c
index 8385dd3..fa2ba9e 100644 (file)
@@ -205,23 +205,6 @@ static int tco_timer_set_heartbeat (int t)
        return 0;
 }
 
-static int tco_timer_get_timeleft (int *time_left)
-{
-       unsigned char val;
-
-       spin_lock(&tco_lock);
-
-       /* read the TCO Timer */
-       val = inb (TCO1_RLD);
-       val &= 0x3f;
-
-       spin_unlock(&tco_lock);
-
-       *time_left = (int)((val * 6) / 10);
-
-       return 0;
-}
-
 /*
  *     /dev/watchdog handling
  */
@@ -289,7 +272,6 @@ static int i8xx_tco_ioctl (struct inode *inode, struct file *file,
 {
        int new_options, retval = -EINVAL;
        int new_heartbeat;
-       int time_left;
        void __user *argp = (void __user *)arg;
        int __user *p = argp;
        static struct watchdog_info ident = {
@@ -338,7 +320,7 @@ static int i8xx_tco_ioctl (struct inode *inode, struct file *file,
                                return -EFAULT;
 
                        if (tco_timer_set_heartbeat(new_heartbeat))
-                               return -EINVAL;
+                           return -EINVAL;
 
                        tco_timer_keepalive ();
                        /* Fall */
@@ -347,14 +329,6 @@ static int i8xx_tco_ioctl (struct inode *inode, struct file *file,
                case WDIOC_GETTIMEOUT:
                        return put_user(heartbeat, p);
 
-               case WDIOC_GETTIMELEFT:
-               {
-                       if (tco_timer_get_timeleft(&time_left))
-                               return -EINVAL;
-
-                       return put_user(time_left, p);
-               }
-
                default:
                        return -ENOIOCTLCMD;
        }
@@ -378,7 +352,7 @@ static int i8xx_tco_notify_sys (struct notifier_block *this, unsigned long code,
  *     Kernel Interfaces
  */
 
-static const struct file_operations i8xx_tco_fops = {
+static struct file_operations i8xx_tco_fops = {
        .owner =        THIS_MODULE,
        .llseek =       no_llseek,
        .write =        i8xx_tco_write,