}
spin_lock(&srmconsp->lock);
- if (srmconsp->tty) {
- srmconsp->timer.expires = jiffies + incr;
- add_timer(&srmconsp->timer);
- }
+ if (srmconsp->tty)
+ mod_timer(&srmconsp->timer, jiffies + incr);
spin_unlock(&srmconsp->lock);
local_irq_restore(flags);
else {
srmconsp->tty = NULL;
spin_lock_init(&srmconsp->lock);
- init_timer(&srmconsp->timer);
+ setup_timer(&srmconsp->timer, srmcons_receive_chars,
+ (unsigned long)srmconsp);
}
spin_unlock_irqrestore(&srmconsp_lock, flags);
tty->driver_data = srmconsp;
srmconsp->tty = tty;
- srmconsp->timer.function = srmcons_receive_chars;
- srmconsp->timer.data = (unsigned long)srmconsp;
- srmconsp->timer.expires = jiffies + 10;
- add_timer(&srmconsp->timer);
+ mod_timer(&srmconsp->timer, jiffies + 10);
}
spin_unlock_irqrestore(&srmconsp->lock, flags);