[PATCH] 2.3.99pre6 use of mod_timer

From: François romieu (romieu@ensta.fr)
Date: Fri Apr 28 2000 - 16:35:30 EST


The following makes systematic the use of mod_timer. Currently, mod_timer
is defined in include/linux/timer.h as a faster replacement for the
sequence del_timer, timer.expires=..., add_timer.
Copy of the adequate snippet have been Cc:ed to the identified maintainers.

diff -u --recursive --new-file linux-2.3.99pre6.orig/arch/mips/sgi/kernel/reset.c linux-2.3.99pre6/arch/mips/sgi/kernel/reset.c
--- linux-2.3.99pre6.orig/arch/mips/sgi/kernel/reset.c Sat Mar 18 07:11:50 2000
+++ linux-2.3.99pre6/arch/mips/sgi/kernel/reset.c Fri Apr 28 21:43:34 2000
@@ -88,9 +88,7 @@
         sgi_hpc_write1 ^= (HPC3_WRITE1_LC0OFF|HPC3_WRITE1_LC1OFF);
         hpc3mregs->write1 = sgi_hpc_write1;
 
- del_timer(&blink_timer);
- blink_timer.expires = jiffies + data;
- add_timer(&blink_timer);
+ mod_timer(&blink_timer, jiffies+data);
 }
 
 static void debounce(unsigned long data)
diff -u --recursive --new-file linux-2.3.99pre6.orig/arch/mips64/sgi-ip22/ip22-reset.c linux-2.3.99pre6/arch/mips64/sgi-ip22/ip22-reset.c
--- linux-2.3.99pre6.orig/arch/mips64/sgi-ip22/ip22-reset.c Sat Mar 18 07:11:51 2000
+++ linux-2.3.99pre6/arch/mips64/sgi-ip22/ip22-reset.c Fri Apr 28 21:43:34 2000
@@ -87,9 +87,7 @@
         sgi_hpc_write1 ^= (HPC3_WRITE1_LC0OFF|HPC3_WRITE1_LC1OFF);
         hpc3mregs->write1 = sgi_hpc_write1;
 
- del_timer(&blink_timer);
- blink_timer.expires = jiffies + data;
- add_timer(&blink_timer);
+ mod_timer(&blink_timer, jiffies+data);
 }
 
 static void debounce(unsigned long data)
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/acorn/block/fd1772.c linux-2.3.99pre6/drivers/acorn/block/fd1772.c
--- linux-2.3.99pre6.orig/drivers/acorn/block/fd1772.c Sat Mar 18 07:09:29 2000
+++ linux-2.3.99pre6/drivers/acorn/block/fd1772.c Fri Apr 28 21:43:34 2000
@@ -303,11 +303,9 @@
         timer_active |= (1 << FLOPPY_TIMER); \
         } while(0)
 
-#define START_TIMEOUT() \
- do { \
- del_timer( &timeout_timer ); \
- timeout_timer.expires = jiffies + FLOPPY_TIMEOUT; \
- add_timer( &timeout_timer ); \
+#define START_TIMEOUT() \
+ do { \
+ mod_timer(&timeout_timer, jiffies+FLOPPY_TIMEOUT); \
         } while(0)
 
 #define STOP_TIMEOUT() \
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/char/dtlk.c linux-2.3.99pre6/drivers/char/dtlk.c
--- linux-2.3.99pre6.orig/drivers/char/dtlk.c Fri Apr 28 20:58:10 2000
+++ linux-2.3.99pre6/drivers/char/dtlk.c Fri Apr 28 21:43:35 2000
@@ -241,6 +241,8 @@
 static unsigned int dtlk_poll(struct file *file, poll_table * wait)
 {
         int mask = 0;
+ unsigned long expires;
+
         TRACE_TEXT(" dtlk_poll");
         /*
            static long int j;
@@ -261,9 +263,8 @@
         /* there are no exception conditions */
 
         /* There won't be any interrupts, so we set a timer instead. */
- del_timer(&dtlk_timer);
- dtlk_timer.expires = jiffies + 3*HZ / 100;
- add_timer(&dtlk_timer);
+ expires = jiffies + 3*HZ / 100;
+ mod_timer(&dtlk_timer, expires);
 
         return mask;
 }
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/char/msp3400.c linux-2.3.99pre6/drivers/char/msp3400.c
--- linux-2.3.99pre6.orig/drivers/char/msp3400.c Fri Apr 28 20:59:40 2000
+++ linux-2.3.99pre6/drivers/char/msp3400.c Fri Apr 28 21:43:35 2000
@@ -663,11 +663,8 @@
         }
         if (once)
                 msp->watch_stereo = 0;
- if (msp->watch_stereo) {
- del_timer(&msp->wake_stereo);
- msp->wake_stereo.expires = jiffies + 5*HZ;
- add_timer(&msp->wake_stereo);
- }
+ if (msp->watch_stereo)
+ mod_timer(&msp->wake_stereo, jiffies+5*HZ);
 }
 
 static int msp3400c_thread(void *data)
@@ -874,11 +871,8 @@
                 /* unmute */
                 msp3400c_setvolume(client, msp->left, msp->right);
 
- if (msp->watch_stereo) {
- del_timer(&msp->wake_stereo);
- msp->wake_stereo.expires = jiffies + 5*HZ;
- add_timer(&msp->wake_stereo);
- }
+ if (msp->watch_stereo)
+ mod_timer(&msp->wake_stereo, jiffies+5*HZ);
 
                 if (debug)
                         msp3400c_print_mode(msp);
@@ -1092,11 +1086,8 @@
                 msp3400c_settreble(client, msp->treble);
                 msp3400c_setvolume(client, msp->left, msp->right);
 
- if (msp->watch_stereo) {
- del_timer(&msp->wake_stereo);
- msp->wake_stereo.expires = jiffies + HZ;
- add_timer(&msp->wake_stereo);
- }
+ if (msp->watch_stereo)
+ mod_timer(&msp->wake_stereo, jiffies+HZ);
 
                 msp->active = 0;
         }
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/char/pc110pad.c linux-2.3.99pre6/drivers/char/pc110pad.c
--- linux-2.3.99pre6.orig/drivers/char/pc110pad.c Sat Mar 18 07:06:31 2000
+++ linux-2.3.99pre6/drivers/char/pc110pad.c Fri Apr 28 21:43:35 2000
@@ -70,20 +70,6 @@
 static int active=0; /* number of concurrent open()s */
 static struct semaphore reader_lock;
 
-/*
- * set_timer_callback:
- *
- * Utility to reset a timer to go off some time in the future.
- */
-
-static void set_timer_callback(struct timer_list *timer, int ticks)
-{
- del_timer(timer);
- timer->expires = jiffies+ticks;
- add_timer(timer);
-}
-
-
 /**
  * wake_readers:
  *
@@ -178,7 +164,7 @@
                 transition_count=1;
                 recent_transition=1;
         }
- set_timer_callback(&tap_timer, current_params.tap_interval);
+ mod_timer(&tap_timer, jiffies + current_params.tap_interval);
 
         /* changes to transition_count can cause reported button to change */
         button_pending = 1;
@@ -369,8 +355,8 @@
                                 else
                                 {
                                         bounce=JUST_GONE_DOWN;
- set_timer_callback(&bounce_timer,
- current_params.bounce_interval);
+ mod_timer(&bounce_timer,
+ jiffies+current_params.bounce_interval);
                                         /* start new stroke/tap */
                                         debounced_down=new_down;
                                         notify_pad_up_down();
@@ -391,8 +377,8 @@
                                 {
                                         /* don't trust it yet */
                                         bounce=JUST_GONE_UP;
- set_timer_callback(&bounce_timer,
- current_params.bounce_interval);
+ mod_timer(&bounce_timer,
+ jiffies+current_params.bounce_interval);
                                 }
                         }
                 }
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/char/softdog.c linux-2.3.99pre6/drivers/char/softdog.c
--- linux-2.3.99pre6.orig/drivers/char/softdog.c Sat Mar 18 07:06:32 2000
+++ linux-2.3.99pre6/drivers/char/softdog.c Fri Apr 28 21:43:35 2000
@@ -83,9 +83,7 @@
         /*
          * Activate timer
          */
- del_timer(&watchdog_ticktock);
- watchdog_ticktock.expires=jiffies + (soft_margin * HZ);
- add_timer(&watchdog_ticktock);
+ mod_timer(&watchdog_ticktock, jiffies+(soft_margin*HZ));
         timer_alive=1;
         return 0;
 }
@@ -104,15 +102,6 @@
         return 0;
 }
 
-static void softdog_ping(void)
-{
- /*
- * Refresh the timer.
- */
-
- mod_timer(&watchdog_ticktock, jiffies + (soft_margin * HZ));
-}
-
 static ssize_t softdog_write(struct file *file, const char *data, size_t len, loff_t *ppos)
 {
         /* Can't seek (pwrite) on this device */
@@ -122,9 +111,8 @@
         /*
          * Refresh the timer.
          */
- if(len)
- {
- softdog_ping();
+ if(len) {
+ mod_timer(&watchdog_ticktock, jiffies+(soft_margin*HZ));
                 return 1;
         }
         return 0;
@@ -151,7 +139,7 @@
                 case WDIOC_GETBOOTSTATUS:
                         return put_user(0,(int *)arg);
                 case WDIOC_KEEPALIVE:
- softdog_ping();
+ mod_timer(&watchdog_ticktock, jiffies+(soft_margin*HZ));
                         return 0;
         }
 }
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/isdn/act2000/module.c linux-2.3.99pre6/drivers/isdn/act2000/module.c
--- linux-2.3.99pre6.orig/drivers/isdn/act2000/module.c Sat Mar 18 06:54:54 2000
+++ linux-2.3.99pre6/drivers/isdn/act2000/module.c Fri Apr 28 21:43:35 2000
@@ -279,9 +279,7 @@
         act2000_receive(card);
         save_flags(flags);
         cli();
- del_timer(&card->ptimer);
- card->ptimer.expires = jiffies + 3;
- add_timer(&card->ptimer);
+ mod_timer(&card->ptimer, jiffies+3);
         restore_flags(flags);
 }
 
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/isdn/hisax/saphir.c linux-2.3.99pre6/drivers/isdn/hisax/saphir.c
--- linux-2.3.99pre6.orig/drivers/isdn/hisax/saphir.c Sat Mar 18 07:09:59 2000
+++ linux-2.3.99pre6/drivers/isdn/hisax/saphir.c Fri Apr 28 21:43:35 2000
@@ -173,11 +173,9 @@
                 goto Start_ISAC;
         }
         /* Watchdog */
- if (cs->hw.saphir.timer.function) {
- del_timer(&cs->hw.saphir.timer);
- cs->hw.saphir.timer.expires = jiffies + 1*HZ;
- add_timer(&cs->hw.saphir.timer);
- } else
+ if (cs->hw.saphir.timer.function)
+ mod_timer(&cs->hw.saphir.timer, jiffies+1*HZ);
+ else
                 printk(KERN_WARNING "saphir: Spurious timer!\n");
         writereg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_MASK, 0xFF);
         writereg(cs->hw.saphir.ale, cs->hw.saphir.hscx, HSCX_MASK + 0x40, 0xFF);
@@ -192,9 +190,7 @@
 {
         /* 5 sec WatchDog, so read at least every 4 sec */
         cs->readisac(cs, ISAC_RBCH);
- del_timer(&cs->hw.saphir.timer);
- cs->hw.saphir.timer.expires = jiffies + 1*HZ;
- add_timer(&cs->hw.saphir.timer);
+ mod_timer(&cs->hw.saphir.timer, jiffies+1*HZ);
 }
 
 void
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/isdn/icn/icn.c linux-2.3.99pre6/drivers/isdn/icn/icn.c
--- linux-2.3.99pre6.orig/drivers/isdn/icn/icn.c Sat Mar 18 06:55:09 2000
+++ linux-2.3.99pre6/drivers/isdn/icn/icn.c Fri Apr 28 21:43:35 2000
@@ -602,9 +602,7 @@
                 /* schedule b-channel polling again */
                 save_flags(flags);
                 cli();
- del_timer(&card->rb_timer);
- card->rb_timer.expires = jiffies + ICN_TIMER_BCREAD;
- add_timer(&card->rb_timer);
+ mod_timer(&card->rb_timer, jiffies+ICN_TIMER_BCREAD);
                 card->flags |= ICN_FLAGS_RBTIMER;
                 restore_flags(flags);
         } else
@@ -905,9 +903,7 @@
         /* schedule again */
         save_flags(flags);
         cli();
- del_timer(&card->st_timer);
- card->st_timer.expires = jiffies + ICN_TIMER_DCREAD;
- add_timer(&card->st_timer);
+ mod_timer(&card->st_timer, jiffies+ICN_TIMER_DCREAD);
         restore_flags(flags);
 }
 
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/isdn/isdn_common.c linux-2.3.99pre6/drivers/isdn/isdn_common.c
--- linux-2.3.99pre6.orig/drivers/isdn/isdn_common.c Fri Apr 28 20:59:43 2000
+++ linux-2.3.99pre6/drivers/isdn/isdn_common.c Fri Apr 28 21:43:35 2000
@@ -685,9 +685,7 @@
 
                 save_flags(flags);
                 cli();
- del_timer(&dev->timer);
- dev->timer.expires = jiffies + ISDN_TIMER_RES;
- add_timer(&dev->timer);
+ mod_timer(&dev->timer, jiffies+ISDN_TIMER_RES);
                 restore_flags(flags);
         }
 }
@@ -708,11 +706,8 @@
                 dev->tflags |= tf;
         else
                 dev->tflags &= ~tf;
- if (dev->tflags) {
- if (!del_timer(&dev->timer)) /* del_timer is 1, when active */
- dev->timer.expires = jiffies + ISDN_TIMER_RES;
- add_timer(&dev->timer);
- }
+ if (dev->tflags)
+ mod_timer(&dev->timer, jiffies+ISDN_TIMER_RES);
         restore_flags(flags);
 }
 
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/isdn/sc/timer.c linux-2.3.99pre6/drivers/isdn/sc/timer.c
--- linux-2.3.99pre6.orig/drivers/isdn/sc/timer.c Thu Feb 27 13:57:30 1997
+++ linux-2.3.99pre6/drivers/isdn/sc/timer.c Fri Apr 28 21:43:35 2000
@@ -91,9 +91,7 @@
         else {
                 pr_debug("%s: No signature yet, waiting another %d jiffies.\n",
                         adapter[card]->devicename, CHECKRESET_TIME);
- del_timer(&adapter[card]->reset_timer);
- adapter[card]->reset_timer.expires = jiffies + CHECKRESET_TIME;
- add_timer(&adapter[card]->reset_timer);
+ mod_timer(&adapter[card]->reset_timer, jiffies+CHECKRESET_TIME);
         }
         restore_flags(flags);
                 
@@ -138,9 +136,7 @@
         /* Reinitialize the timer */
         save_flags(flags);
         cli();
- del_timer(&adapter[card]->stat_timer);
- adapter[card]->stat_timer.expires = jiffies + CHECKSTAT_TIME;
- add_timer(&adapter[card]->stat_timer);
+ mod_timer(&adapter[card]->stat_timer, jiffies+CHECKSTAT_TIME);
         restore_flags(flags);
 
         /* Send a new cePhyStatus message */
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/net/3c59x.c linux-2.3.99pre6/drivers/net/3c59x.c
--- linux-2.3.99pre6.orig/drivers/net/3c59x.c Fri Apr 28 20:59:43 2000
+++ linux-2.3.99pre6/drivers/net/3c59x.c Fri Apr 28 21:43:35 2000
@@ -1736,9 +1736,7 @@
                                 outw(AckIntr | (vp->deferred & 0x7ff), ioaddr + EL3_CMD);
                         } while ((status = inw(ioaddr + EL3_CMD)) & IntLatch);
                         /* The timer will reenable interrupts. */
- del_timer(&vp->timer);
- vp->timer.expires = RUN_AT(1);
- add_timer(&vp->timer);
+ mod_timer(&vp->timer, jiffies+1*HZ);
                         break;
                 }
                 /* Acknowledge the IRQ. */
@@ -1854,9 +1852,7 @@
                                 outw(AckIntr | (vp->deferred & 0x7ff), ioaddr + EL3_CMD);
                         } while ((status = inw(ioaddr + EL3_CMD)) & IntLatch);
                         /* The timer will reenable interrupts. */
- del_timer(&vp->timer);
- vp->timer.expires = RUN_AT(1);
- add_timer(&vp->timer);
+ mod_timer(&vp->timer, jiffies+1*HZ);
                         break;
                 }
                 /* Acknowledge the IRQ. */
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/net/atp.c linux-2.3.99pre6/drivers/net/atp.c
--- linux-2.3.99pre6.orig/drivers/net/atp.c Sat Mar 18 07:08:52 2000
+++ linux-2.3.99pre6/drivers/net/atp.c Fri Apr 28 21:43:35 2000
@@ -571,9 +571,7 @@
                 for (i = 0; i < 6; i++)
                         write_reg_byte(ioaddr, PAR0 + i, dev->dev_addr[i]);
 #ifdef TIMED_CHECKER
- del_timer(&atp_timer);
- atp_timer.expires = jiffies + TIMED_CHECKER;
- add_timer(&atp_timer);
+ mod_timer(&atp_timer, jiffies+TIMED_CHECKER);
 #endif
         }
 
@@ -605,9 +603,7 @@
         for (i = 0; i < 6; i++)
                 write_reg_byte(ioaddr, PAR0 + i, atp_timed_dev->dev_addr[i]);
         spin_unlock(&lp->lock);
- del_timer(&atp_timer);
- atp_timer.expires = jiffies + TIMED_CHECKER;
- add_timer(&atp_timer);
+ mod_timer(&atp_timer, jiffies+TIMED_CHECKER);
 }
 #endif
 
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/net/wan/cycx_x25.c linux-2.3.99pre6/drivers/net/wan/cycx_x25.c
--- linux-2.3.99pre6.orig/drivers/net/wan/cycx_x25.c Fri Apr 28 20:58:44 2000
+++ linux-2.3.99pre6/drivers/net/wan/cycx_x25.c Fri Apr 28 21:43:35 2000
@@ -1513,11 +1513,8 @@
 {
         x25_channel_t *chan = dev->priv;
 
- if (chan->svc) {
- del_timer(&chan->timer);
- chan->timer.expires = jiffies + chan->idle_tmout * HZ;
- add_timer(&chan->timer);
- }
+ if (chan->svc)
+ mod_timer(&chan->timer, jiffies+chan->idle_tmout*HZ);
 }
 #ifdef CYCLOMX_X25_DEBUG
 static void x25_dump_config(TX25Config *conf)
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/scsi/NCR5380.c linux-2.3.99pre6/drivers/scsi/NCR5380.c
--- linux-2.3.99pre6.orig/drivers/scsi/NCR5380.c Sat Mar 18 06:50:39 2000
+++ linux-2.3.99pre6/drivers/scsi/NCR5380.c Fri Apr 28 21:43:35 2000
@@ -667,9 +667,7 @@
         ((struct NCR5380_hostdata *) instance->hostdata)->next_timer = tmp;
         *prev = instance;
    
- del_timer(&usleep_timer);
- usleep_timer.expires = ((struct NCR5380_hostdata *) expires_first->hostdata)->time_expires;
- add_timer(&usleep_timer);
+ mod_timer(&usleep_timer, ((struct NCR5380_hostdata *) expires_first->hostdata)->time_expires);
         restore_flags(flags);
         return 0;
 }
diff -u --recursive --new-file linux-2.3.99pre6.orig/drivers/scsi/aic7xxx.c linux-2.3.99pre6/drivers/scsi/aic7xxx.c
--- linux-2.3.99pre6.orig/drivers/scsi/aic7xxx.c Sat Mar 18 07:15:27 2000
+++ linux-2.3.99pre6/drivers/scsi/aic7xxx.c Fri Apr 28 21:43:35 2000
@@ -3585,9 +3585,7 @@
       if ( !(p->dev_timer_active & (0x01 << MAX_TARGETS)) ||
             time_after_eq(p->dev_timer.expires, p->dev_expires[i]) )
       {
- del_timer(&p->dev_timer);
- p->dev_timer.expires = p->dev_expires[i];
- add_timer(&p->dev_timer);
+ mod_timer(&p->dev_timer, p->dev_expires[i]);
         p->dev_timer_active |= (0x01 << MAX_TARGETS);
       }
     }
@@ -5045,11 +5043,7 @@
                 }
                 else if ( time_after_eq(p->dev_timer.expires,
                                         p->dev_expires[tindex]) )
- {
- del_timer(&p->dev_timer);
- p->dev_timer.expires = p->dev_expires[tindex];
- add_timer(&p->dev_timer);
- }
+ mod_timer(&p->dev_timer, p->dev_expires[tindex]);
               }
 #ifdef AIC7XXX_VERBOSE_DEBUGGING
               if( (aic7xxx_verbose & VERBOSE_MINOR_ERROR) ||
@@ -12058,9 +12052,7 @@
       if ( !(p->dev_timer_active & (0x01 << MAX_TARGETS)) ||
             time_after_eq(p->dev_timer.expires, p->dev_expires[p->scsi_id]) )
       {
- del_timer(&p->dev_timer);
- p->dev_timer.expires = p->dev_expires[p->scsi_id];
- add_timer(&p->dev_timer);
+ mod_timer(&p->dev_timer, p->dev_expires[p->scsi_id]);
         p->dev_timer_active |= (0x01 << MAX_TARGETS);
       }
       aic7xxx_reset_channel(p, cmd->channel, TRUE);
diff -u --recursive --new-file linux-2.3.99pre6.orig/net/ipv4/ipmr.c linux-2.3.99pre6/net/ipv4/ipmr.c
--- linux-2.3.99pre6.orig/net/ipv4/ipmr.c Fri Apr 28 20:58:14 2000
+++ linux-2.3.99pre6/net/ipv4/ipmr.c Fri Apr 28 21:43:35 2000
@@ -321,7 +321,7 @@
         struct mfc_cache *c, **cp;
 
         if (!spin_trylock(&mfc_unres_lock)) {
- mod_timer(&ipmr_expire_timer, jiffies + HZ/10);
+ mod_timer(&ipmr_expire_timer, jiffies+HZ/10);
                 return;
         }
 
@@ -661,9 +661,7 @@
                 c->next = mfc_unres_queue;
                 mfc_unres_queue = c;
 
- if (!del_timer(&ipmr_expire_timer))
- ipmr_expire_timer.expires = c->mfc_un.unres.expires;
- add_timer(&ipmr_expire_timer);
+ mod_timer(&ipmr_expire_timer, c->mfc_un.unres.expires);
         }
 
         /*
diff -u --recursive --new-file linux-2.3.99pre6.orig/net/ipx/af_spx.c linux-2.3.99pre6/net/ipx/af_spx.c
--- linux-2.3.99pre6.orig/net/ipx/af_spx.c Fri Apr 28 20:59:58 2000
+++ linux-2.3.99pre6/net/ipx/af_spx.c Fri Apr 28 21:43:35 2000
@@ -466,9 +466,7 @@
         ipxh->spx.allocseq = htons(pdata->alloc);
 
         /* Reset/Set WD timer */
- del_timer(&pdata->watchdog);
- pdata->watchdog.expires = jiffies + VERIFY_TIMEOUT;
- add_timer(&pdata->watchdog);
+ mod_timer(&pdata->watchdog, jiffies+VERIFY_TIMEOUT);
 
         switch(type)
         {
diff -u --recursive --new-file linux-2.3.99pre6.orig/net/sched/sch_tbf.c linux-2.3.99pre6/net/sched/sch_tbf.c
--- linux-2.3.99pre6.orig/net/sched/sch_tbf.c Sat Mar 18 07:11:28 2000
+++ linux-2.3.99pre6/net/sched/sch_tbf.c Fri Apr 28 21:43:35 2000
@@ -232,9 +232,7 @@
                         if (delay == 0)
                                 delay = 1;
 
- del_timer(&q->wd_timer);
- q->wd_timer.expires = jiffies + delay;
- add_timer(&q->wd_timer);
+ mod_timer(&q->wd_timer, jiffies+delay);
                 }
 
                 /* Maybe we have a shorter packet in the queue,

--
Ueimor

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:15 EST