From 97b5da56f4bd3f0dfb56b2b554afa9683ba16ce8 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sun, 7 Oct 2001 20:45:31 +0000 Subject: [PATCH] fixed bug with stop_src == TRIG_NONE introduced with changes for poll() code --- comedi/drivers/das16m1.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/comedi/drivers/das16m1.c b/comedi/drivers/das16m1.c index 46647d07..103dbd89 100644 --- a/comedi/drivers/das16m1.c +++ b/comedi/drivers/das16m1.c @@ -527,8 +527,11 @@ static void das16m1_handler(comedi_device *dev, unsigned int status) num_samples = - hw_counter - devpriv->adc_count; } // check if we only need some of the points - if(num_samples > cmd->stop_arg * cmd->chanlist_len) - num_samples = cmd->stop_arg * cmd->chanlist_len; + if(cmd->stop_src == TRIG_COUNT) + { + if(num_samples > cmd->stop_arg * cmd->chanlist_len) + num_samples = cmd->stop_arg * cmd->chanlist_len; + } // make sure we dont try to get too many points if fifo has overrun if(num_samples > FIFO_SIZE) num_samples = FIFO_SIZE; -- 2.26.2