From c931f79b615f4ab781fc28702985f0109dad6113 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Mon, 27 Jan 2003 17:19:43 +0000 Subject: [PATCH] don't allow irq and timer mode to be used simultaneously --- comedi/drivers/das16.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/comedi/drivers/das16.c b/comedi/drivers/das16.c index c0f8b72a..1e753f6c 100644 --- a/comedi/drivers/das16.c +++ b/comedi/drivers/das16.c @@ -1344,7 +1344,10 @@ static int das16_attach(comedi_device *dev, comedi_devconfig *it) comedi_krange *user_ai_range, *user_ao_range; iobase = it->options[0]; - + irq = it->options[1]; + timer_mode = it->options[8]; + if( timer_mode ) irq = 0; + printk("comedi%d: das16:",dev->minor); // check that clock setting is valid @@ -1415,8 +1418,7 @@ static int das16_attach(comedi_device *dev, comedi_devconfig *it) } /* now for the irq */ - irq = it->options[1]; - if(irq > 1 && irq < 8) + if( irq > 1 && irq < 8 ) { if((ret=comedi_request_irq(irq, das16_dma_interrupt, 0, "das16",dev)) < 0) return ret; @@ -1490,7 +1492,6 @@ static int das16_attach(comedi_device *dev, comedi_devconfig *it) user_ao_range->flags = UNIT_volt; } - timer_mode = it->options[8]; if(timer_mode) { init_timer(&(devpriv->timer)); -- 2.26.2