diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c index e56525a1c8f3..fbc43420f698 100644 --- a/drivers/staging/comedi/drivers/comedi_test.c +++ b/drivers/staging/comedi/drivers/comedi_test.c @@ -420,9 +420,8 @@ static int waveform_attach(struct comedi_device *dev, for (i = 0; i < s->n_chan; i++) devpriv->ao_loopbacks[i] = s->maxdata / 2; - init_timer(&devpriv->timer); - devpriv->timer.function = waveform_ai_interrupt; - devpriv->timer.data = (unsigned long)dev; + setup_timer(&devpriv->timer, waveform_ai_interrupt, + (unsigned long)dev); dev_info(dev->class_dev, "%s: %i microvolt, %li microsecond waveform attached\n",