blitq->cur = cur;
                        blitq->num_outstanding--;
                        blitq->end = jiffies + DRM_HZ;
-                       if (!timer_pending(&blitq->poll_timer)) {
-                               blitq->poll_timer.expires = jiffies+1;
-                               add_timer(&blitq->poll_timer);
-                       }
+                       if (!timer_pending(&blitq->poll_timer))
+                               mod_timer(&blitq->poll_timer, jiffies + 1);
                } else {
                        if (timer_pending(&blitq->poll_timer)) {
                                del_timer(&blitq->poll_timer);
        via_dmablit_handler(dev, engine, 0);
        
        if (!timer_pending(&blitq->poll_timer)) {
-               blitq->poll_timer.expires = jiffies+1;
-               add_timer(&blitq->poll_timer);
+               mod_timer(&blitq->poll_timer, jiffies + 1);
 
               /*
                * Rerun handler to delete timer if engines are off, and
                }
                DRM_INIT_WAITQUEUE(&blitq->busy_queue);
                INIT_WORK(&blitq->wq, via_dmablit_workqueue);
-               init_timer(&blitq->poll_timer);
-               blitq->poll_timer.function = &via_dmablit_timer;
-               blitq->poll_timer.data = (unsigned long) blitq;
+               setup_timer(&blitq->poll_timer, via_dmablit_timer,
+                               (unsigned long)blitq);
        }       
 }
 
 
 #define TRACE_RET ((void) 0)
 #endif                         /* TRACING */
 
+static void dtlk_timer_tick(unsigned long data);
 
 static int dtlk_major;
 static int dtlk_port_lpc;
 static unsigned int dtlk_portlist[] =
 {0x25e, 0x29e, 0x2de, 0x31e, 0x35e, 0x39e, 0};
 static wait_queue_head_t dtlk_process_list;
-static struct timer_list dtlk_timer;
+static DEFINE_TIMER(dtlk_timer, dtlk_timer_tick, 0, 0);
 
 /* prototypes for file_operations struct */
 static ssize_t dtlk_read(struct file *, char __user *,
 /*
    static void dtlk_handle_error(char, char, unsigned int);
  */
-static void dtlk_timer_tick(unsigned long data);
 
 static ssize_t dtlk_read(struct file *file, char __user *buf,
                         size_t count, loff_t * ppos)
        }
        TRACE_RET;
        
-       del_timer(&dtlk_timer);
+       del_timer_sync(&dtlk_timer);
 
        return 0;
 }
        if (dtlk_dev_probe() == 0)
                printk(", MAJOR %d\n", dtlk_major);
 
-       init_timer(&dtlk_timer);
-       dtlk_timer.function = dtlk_timer_tick;
        init_waitqueue_head(&dtlk_process_list);
 
        return 0;
 
 // Not a documented part of the library routines (careful...) but the Diagnostic
 // i2diag.c finds them useful to help the throughput in certain limited
 // single-threaded operations.
-static void iiSendPendingMail(i2eBordStrPtr);
+static inline void iiSendPendingMail(i2eBordStrPtr);
 static void serviceOutgoingFifo(i2eBordStrPtr);
 
 // Functions defined in ip2.c as part of interrupt handling
                          == (CHANNEL_MAGIC | CHANNEL_SUPPORT));
 }
 
+static void iiSendPendingMail_t(unsigned long data)
+{
+       i2eBordStrPtr pB = (i2eBordStrPtr)data;
+
+       iiSendPendingMail(pB);
+}
+
 //******************************************************************************
 // Function:   iiSendPendingMail(pB)
 // Parameters: Pointer to a board structure
                        /\/\|=mhw=|\/\/                         */
 
                        if( ++pB->SendPendingRetry < 16 ) {
-
-                               init_timer( &(pB->SendPendingTimer) );
-                               pB->SendPendingTimer.expires  = jiffies + 1;
-                               pB->SendPendingTimer.function = (void*)(unsigned long)iiSendPendingMail;
-                               pB->SendPendingTimer.data     = (unsigned long)pB;
-                               add_timer( &(pB->SendPendingTimer) );
+                               setup_timer(&pB->SendPendingTimer,
+                                       iiSendPendingMail_t, (unsigned long)pB);
+                               mod_timer(&pB->SendPendingTimer, jiffies + 1);
                        } else {
                                printk( KERN_ERR "IP2: iiSendPendingMail unable to queue outbound mail\n" );
                        }
 // soon as all the data is completely sent.
 //******************************************************************************
 static void
-i2DrainWakeup(i2ChanStrPtr pCh)
+i2DrainWakeup(unsigned long d)
 {
+       i2ChanStrPtr pCh = (i2ChanStrPtr)d;
+
        ip2trace (CHANN, ITRC_DRAIN, 10, 1, pCh->BookmarkTimer.expires );
 
        pCh->BookmarkTimer.expires = 0;
        }
        if ((timeout > 0) && (pCh->BookmarkTimer.expires == 0 )) {
                // One per customer (channel)
-               init_timer( &(pCh->BookmarkTimer) );
-               pCh->BookmarkTimer.expires  = jiffies + timeout;
-               pCh->BookmarkTimer.function = (void*)(unsigned long)i2DrainWakeup;
-               pCh->BookmarkTimer.data     = (unsigned long)pCh;
+               setup_timer(&pCh->BookmarkTimer, i2DrainWakeup,
+                               (unsigned long)pCh);
 
                ip2trace (CHANN, ITRC_DRAIN, 1, 1, pCh->BookmarkTimer.expires );
 
-               add_timer( &(pCh->BookmarkTimer) );
+               mod_timer(&pCh->BookmarkTimer, jiffies + timeout);
        }
        
        i2QueueCommands( PTYPE_INLINE, pCh, -1, 1, CMD_BMARK_REQ );
 
        tty->disc_data = pInfo;
        tty->receive_room = 65536;
 
-       init_timer(&pInfo->tmr);
-       pInfo->tmr.data = (unsigned long)pInfo;
-       pInfo->tmr.function = on_timeout;
+       setup_timer(&pInfo->tmr, on_timeout, (unsigned long)pInfo);
 
        return 0;
 }
 
 #define __NWBUTTON_C           /* Tell the header file who we are */
 #include "nwbutton.h"
 
+static void button_sequence_finished (unsigned long parameters);
+
 static int button_press_count;         /* The count of button presses */
-static struct timer_list button_timer; /* Times for the end of a sequence */ 
+/* Times for the end of a sequence */
+static DEFINE_TIMER(button_timer, button_sequence_finished, 0, 0);
 static DECLARE_WAIT_QUEUE_HEAD(button_wait_queue); /* Used for blocking read */
 static char button_output_buffer[32];  /* Stores data to write out of device */
 static int bcount;                     /* The number of bytes in the buffer */
 
 static irqreturn_t button_handler (int irq, void *dev_id)
 {
-       if (button_press_count) {
-               del_timer (&button_timer);
-       }
        button_press_count++;
-       init_timer (&button_timer);
-       button_timer.function = button_sequence_finished;
-       button_timer.expires = (jiffies + bdelay);
-       add_timer (&button_timer);
+       mod_timer(&button_timer, jiffies + bdelay);
 
        return IRQ_HANDLED;
 }
 
 
 return_with_timer:
        DEBUGP(7, dev, "<- monitor_card (returns with timer)\n");
-       dev->timer.expires = jiffies + dev->mdelay;
-       add_timer(&dev->timer);
+       mod_timer(&dev->timer, jiffies + dev->mdelay);
        clear_bit(LOCK_MONITOR, &dev->flags);
 }
 
        DEBUGP(3, dev, "-> start_monitor\n");
        if (!dev->monitor_running) {
                DEBUGP(5, dev, "create, init and add timer\n");
-               init_timer(&dev->timer);
+               setup_timer(&dev->timer, monitor_card, (unsigned long)dev);
                dev->monitor_running = 1;
-               dev->timer.expires = jiffies;
-               dev->timer.data = (unsigned long) dev;
-               dev->timer.function = monitor_card;
-               add_timer(&dev->timer);
+               mod_timer(&dev->timer, jiffies);
        } else
                DEBUGP(5, dev, "monitor already running\n");
        DEBUGP(3, dev, "<- start_monitor\n");
 
        init_waitqueue_head(&dev->poll_wait);
        init_waitqueue_head(&dev->read_wait);
        init_waitqueue_head(&dev->write_wait);
-       init_timer(&dev->poll_timer);
-       dev->poll_timer.function = &cm4040_do_poll;
+       setup_timer(&dev->poll_timer, cm4040_do_poll, 0);
 
        ret = reader_config(link, i);
        if (ret)
 
        
        memset(&info->icount, 0, sizeof(info->icount));
 
-       init_timer(&info->tx_timer);
-       info->tx_timer.data = (unsigned long)info;
-       info->tx_timer.function = tx_timeout;
+       setup_timer(&info->tx_timer, tx_timeout, (unsigned long)info);
 
        /* Allocate and claim adapter resources */
        retval = claim_resources(info);
        wake_up_interruptible(&info->status_event_wait_q);
        wake_up_interruptible(&info->event_wait_q);
 
-       del_timer(&info->tx_timer);     
+       del_timer_sync(&info->tx_timer);
 
        if (info->tx_buf) {
                free_page((unsigned long) info->tx_buf);
                } else {
                        info->tx_active = 1;
                        tx_ready(info);
-                       info->tx_timer.expires = jiffies + msecs_to_jiffies(5000);
-                       add_timer(&info->tx_timer);     
+                       mod_timer(&info->tx_timer, jiffies +
+                                       msecs_to_jiffies(5000));
                }
        }
 
 
        func_enter();
 
        rio_interrupt(0, &p->RIOHosts[data]);
-       p->RIOHosts[data].timer.expires = jiffies + rio_poll;
-       add_timer(&p->RIOHosts[data].timer);
+       mod_timer(&p->RIOHosts[data].timer, jiffies + rio_poll);
 
        func_exit();
 }
                /* Init the timer "always" to make sure that it can safely be
                   deleted when we unload... */
 
-               init_timer(&hp->timer);
+               setup_timer(&hp->timer, rio_pollfunc, i);
                if (!hp->Ivec) {
                        rio_dprintk(RIO_DEBUG_INIT, "Starting polling at %dj intervals.\n", rio_poll);
-                       hp->timer.data = i;
-                       hp->timer.function = rio_pollfunc;
-                       hp->timer.expires = jiffies + rio_poll;
-                       add_timer(&hp->timer);
+                       mod_timer(&hp->timer, jiffies + rio_poll);
                }
        }
 
                        rio_dprintk(RIO_DEBUG_INIT, "freed irq %d.\n", hp->Ivec);
                }
                /* It is safe/allowed to del_timer a non-active timer */
-               del_timer(&hp->timer);
+               del_timer_sync(&hp->timer);
                if (hp->Caddr)
                        iounmap(hp->Caddr);
                if (hp->Type == RIO_PCI)
 
 
 /****** RocketPort Local Variables ******/
 
+static void rp_do_poll(unsigned long dummy);
+
 static struct tty_driver *rocket_driver;
 
 static struct rocket_version driver_version = {        
 static unsigned int xmit_flags[NUM_BOARDS];           /*  Bit significant, indicates port had data to transmit. */
                                                       /*  eg.  Bit 0 indicates port 0 has xmit data, ...        */
 static atomic_t rp_num_ports_open;                    /*  Number of serial ports open                           */
-static struct timer_list rocket_timer;
+static DEFINE_TIMER(rocket_timer, rp_do_poll, 0, 0);
 
 static unsigned long board1;                          /* ISA addresses, retrieved from rocketport.conf          */
 static unsigned long board2;
        if (!rocket_driver)
                return -ENOMEM;
 
-       /*
-        * Set up the timer channel.
-        */
-       init_timer(&rocket_timer);
-       rocket_timer.function = rp_do_poll;
-
        /*
         * Initialize the array of pointers to our own internal state
         * structures.
 
 static DECLARE_WAIT_QUEUE_HEAD(rtc_wait);
 
 #ifdef RTC_IRQ
-static struct timer_list rtc_irq_timer;
+static void rtc_dropped_irq(unsigned long data);
+
+static DEFINE_TIMER(rtc_irq_timer, rtc_dropped_irq, 0, 0);
 #endif
 
 static ssize_t rtc_read(struct file *file, char __user *buf,
 
 static void get_rtc_alm_time (struct rtc_time *alm_tm);
 #ifdef RTC_IRQ
-static void rtc_dropped_irq(unsigned long data);
-
 static void set_rtc_irq_bit_locked(unsigned char bit);
 static void mask_rtc_irq_bit_locked(unsigned char bit);
 
 
                spin_lock_irqsave (&rtc_lock, flags);
                if (!(rtc_status & RTC_TIMER_ON)) {
-                       rtc_irq_timer.expires = jiffies + HZ/rtc_freq + 2*HZ/100;
-                       add_timer(&rtc_irq_timer);
+                       mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq +
+                                       2*HZ/100);
                        rtc_status |= RTC_TIMER_ON;
                }
                set_rtc_irq_bit_locked(RTC_PIE);
        if (rtc_has_irq == 0)
                goto no_irq2;
 
-       init_timer(&rtc_irq_timer);
-       rtc_irq_timer.function = rtc_dropped_irq;
        spin_lock_irq(&rtc_lock);
        rtc_freq = 1024;
        if (!hpet_set_periodic_freq(rtc_freq)) {
 
                sx_interrupt (((struct specialix_board *)data)->irq,
                                (void*)data);
        }
-       missed_irq_timer.expires = jiffies + sx_poll;
-       add_timer (&missed_irq_timer);
+       mod_timer(&missed_irq_timer, jiffies + sx_poll);
 }
 #endif
 
        dprintk (SX_DEBUG_INIT, " GFCR = 0x%02x\n", sx_in_off(bp, CD186x_GFRCR) );
 
 #ifdef SPECIALIX_TIMER
-       init_timer (&missed_irq_timer);
-       missed_irq_timer.function = missed_irq;
-       missed_irq_timer.data = (unsigned long) bp;
-       missed_irq_timer.expires = jiffies + sx_poll;
-       add_timer (&missed_irq_timer);
+       setup_timer(&missed_irq_timer, missed_irq, (unsigned long)bp);
+       mod_timer(&missed_irq_timer, jiffies + sx_poll);
 #endif
 
        printk(KERN_INFO"sx%d: specialix IO8+ board detected at 0x%03x, IRQ %d, CD%d Rev. %c.\n",
                if (sx_board[i].flags & SX_BOARD_PRESENT)
                        sx_release_io_range(&sx_board[i]);
 #ifdef SPECIALIX_TIMER
-       del_timer (&missed_irq_timer);
+       del_timer_sync(&missed_irq_timer);
 #endif
 
        func_exit();
 
        
        memset(&info->icount, 0, sizeof(info->icount));
 
-       init_timer(&info->tx_timer);
-       info->tx_timer.data = (unsigned long)info;
-       info->tx_timer.function = mgsl_tx_timeout;
+       setup_timer(&info->tx_timer, mgsl_tx_timeout, (unsigned long)info);
        
        /* Allocate and claim adapter resources */
        retval = mgsl_claim_resources(info);
        wake_up_interruptible(&info->status_event_wait_q);
        wake_up_interruptible(&info->event_wait_q);
 
-       del_timer(&info->tx_timer);     
+       del_timer_sync(&info->tx_timer);
 
        if (info->xmit_buf) {
                free_page((unsigned long) info->xmit_buf);
                        
                        usc_TCmd( info, TCmd_SendFrame );
                        
-                       info->tx_timer.expires = jiffies + msecs_to_jiffies(5000);
-                       add_timer(&info->tx_timer);     
+                       mod_timer(&info->tx_timer, jiffies +
+                                       msecs_to_jiffies(5000));
                }
                info->tx_active = 1;
        }
 
                if (i < count) {
                        /* receive buffer not completed */
                        info->rbuf_index += i;
-                       info->rx_timer.expires = jiffies + 1;
-                       add_timer(&info->rx_timer);
+                       mod_timer(&info->rx_timer, jiffies + 1);
                        break;
                }
 
                info->adapter_num = adapter_num;
                info->port_num = port_num;
 
-               init_timer(&info->tx_timer);
-               info->tx_timer.data = (unsigned long)info;
-               info->tx_timer.function = tx_timeout;
-
-               init_timer(&info->rx_timer);
-               info->rx_timer.data = (unsigned long)info;
-               info->rx_timer.function = rx_timeout;
+               setup_timer(&info->tx_timer, tx_timeout, (unsigned long)info);
+               setup_timer(&info->rx_timer, rx_timeout, (unsigned long)info);
 
                /* Copy configuration info to device instance data */
                info->pdev = pdev;
                                }
                        }
 
-                       if (info->params.mode == MGSL_MODE_HDLC) {
-                               info->tx_timer.expires = jiffies + msecs_to_jiffies(5000);
-                               add_timer(&info->tx_timer);
-                       }
+                       if (info->params.mode == MGSL_MODE_HDLC)
+                               mod_timer(&info->tx_timer, jiffies +
+                                               msecs_to_jiffies(5000));
                } else {
                        tdma_reset(info);
                        /* set 1st descriptor address */
 
 
        change_params(info);
 
-       info->status_timer.expires = jiffies + msecs_to_jiffies(10);
-       add_timer(&info->status_timer);
+       mod_timer(&info->status_timer, jiffies + msecs_to_jiffies(10));
 
        if (info->tty)
                clear_bit(TTY_IO_ERROR, &info->tty->flags);
                info->bus_type = MGSL_BUS_TYPE_PCI;
                info->irq_flags = IRQF_SHARED;
 
-               init_timer(&info->tx_timer);
-               info->tx_timer.data = (unsigned long)info;
-               info->tx_timer.function = tx_timeout;
-
-               init_timer(&info->status_timer);
-               info->status_timer.data = (unsigned long)info;
-               info->status_timer.function = status_timeout;
+               setup_timer(&info->tx_timer, tx_timeout, (unsigned long)info);
+               setup_timer(&info->status_timer, status_timeout,
+                               (unsigned long)info);
 
                /* Store the PCI9050 misc control register value because a flaw
                 * in the PCI9050 prevents LCR registers from being read if
                        write_reg(info, TXDMA + DIR, 0x40);             /* enable Tx DMA interrupts (EOM) */
                        write_reg(info, TXDMA + DSR, 0xf2);             /* clear Tx DMA IRQs, enable Tx DMA */
        
-                       info->tx_timer.expires = jiffies + msecs_to_jiffies(5000);
-                       add_timer(&info->tx_timer);
+                       mod_timer(&info->tx_timer, jiffies +
+                                       msecs_to_jiffies(5000));
                }
                else {
                        tx_load_fifo(info);
        if (status)
                isr_io_pin(info,status);
 
-       info->status_timer.data = (unsigned long)info;
-       info->status_timer.function = status_timeout;
-       info->status_timer.expires = jiffies + msecs_to_jiffies(10);
-       add_timer(&info->status_timer);
+       mod_timer(&info->status_timer, jiffies + msecs_to_jiffies(10));
 }
 
 
 
 
        INIT_WORK(&chip->work, timeout_work);
 
-       init_timer(&chip->user_read_timer);
-       chip->user_read_timer.function = user_reader_timeout;
-       chip->user_read_timer.data = (unsigned long) chip;
+       setup_timer(&chip->user_read_timer, user_reader_timeout,
+                       (unsigned long)chip);
 
        memcpy(&chip->vendor, entry, sizeof(struct tpm_vendor_specific));
 
 
  */
 int (*console_blank_hook)(int);
 
-static struct timer_list console_timer;
+static DEFINE_TIMER(console_timer, blank_screen_t, 0, 0);
 static int blank_state;
 static int blank_timer_expired;
 enum {
        for (i = 0; i < MAX_NR_CONSOLES; i++)
                con_driver_map[i] = conswitchp;
 
-       init_timer(&console_timer);
-       console_timer.function = blank_screen_t;
        if (blankinterval) {
                blank_state = blank_normal_wait;
                mod_timer(&console_timer, jiffies + blankinterval);