From: David Schleef Date: Mon, 4 Jun 2001 22:42:19 +0000 (+0000) Subject: Reverted the variable timeout part of the last change. X-Git-Tag: r0_7_60~186 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=77502e87622e215deae4de694afead3b7e278987;p=comedi.git Reverted the variable timeout part of the last change. --- diff --git a/comedi/drivers/das08.c b/comedi/drivers/das08.c index 550e85e5..8df4be6c 100644 --- a/comedi/drivers/das08.c +++ b/comedi/drivers/das08.c @@ -384,7 +384,7 @@ struct das08_private_struct{ #define devpriv ((struct das08_private_struct *)dev->private) #define thisboard ((struct das08_board_struct *)dev->board_ptr) -#define TIMEOUT 1000 +#define TIMEOUT 100000 static int das08_ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data) { @@ -421,12 +421,11 @@ static int das08_ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *in /* trigger conversion */ outb_p(0,dev->iobase+DAS08_TRIG_12BIT); - for(i=0;i<(thisboard->ai_nbits == 16 ? 100 : 1) * TIMEOUT; - i++){ + for(i=0;iiobase+DAS08_STATUS)&DAS08_EOC)) break; } - if(i==(thisboard->ai_nbits == 16 ? 100 : 1) * TIMEOUT){ + if(i==TIMEOUT){ rt_printk("das08: timeout\n"); return -ETIME; }