This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / s390 / char / con3270.c
index 77cbe9c..11c1b3b 100644 (file)
@@ -73,11 +73,14 @@ void
 con3270_set_timer(struct con3270 *cp, int expires)
 {
        if (expires == 0) {
-               del_timer(&cp->timer);
+               if (timer_pending(&cp->timer))
+                       del_timer(&cp->timer);
                return;
        }
-       if (mod_timer(&cp->timer, jiffies + expires))
-               return;
+       if (timer_pending(&cp->timer)) {
+               if (mod_timer(&cp->timer, jiffies + expires))
+                       return;
+       }
        cp->timer.function = (void (*)(unsigned long)) con3270_update;
        cp->timer.data = (unsigned long) cp;
        cp->timer.expires = jiffies + expires;