diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c index be6277ae4abc..f66db97b9d4f 100644 --- a/drivers/staging/comedi/drivers/das16.c +++ b/drivers/staging/comedi/drivers/das16.c @@ -935,9 +935,8 @@ static void das16_alloc_dma(struct comedi_device *dev, unsigned int dma_chan) devpriv->dma = comedi_isadma_alloc(dev, 2, dma_chan, dma_chan, DAS16_DMA_SIZE, COMEDI_ISADMA_READ); if (devpriv->dma) { - init_timer(&devpriv->timer); - devpriv->timer.function = das16_timer_interrupt; - devpriv->timer.data = (unsigned long)dev; + setup_timer(&devpriv->timer, das16_timer_interrupt, + (unsigned long)dev); } } diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index 81fab2dfafa4..282c37f759d8 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/drivers/staging/comedi/drivers/jr3_pci.c @@ -706,8 +706,6 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, if (!devpriv) return -ENOMEM; - init_timer(&devpriv->timer); - ret = comedi_pci_enable(dev); if (ret) return ret; @@ -775,8 +773,7 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, spriv->next_time_max = jiffies + msecs_to_jiffies(2000); } - devpriv->timer.data = (unsigned long)dev; - devpriv->timer.function = jr3_pci_poll_dev; + setup_timer(&devpriv->timer, jr3_pci_poll_dev, (unsigned long)dev); devpriv->timer.expires = jiffies + msecs_to_jiffies(1000); add_timer(&devpriv->timer);