From e43c7321d64d2d7ab9c669fb95d194c0b588b7c7 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 18 Jun 2010 10:00:26 +0000 Subject: [PATCH] adl_pci9111: bug fix for AI commands when scan_begin_src is TRIG_FOLLOW. The dev_private->scan_delay should have been left set to 0 in this case, but it ended up being set to (unsigned int)-1. --- comedi/drivers/adl_pci9111.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/comedi/drivers/adl_pci9111.c b/comedi/drivers/adl_pci9111.c index 2bc370c4..85dc4dc6 100644 --- a/comedi/drivers/adl_pci9111.c +++ b/comedi/drivers/adl_pci9111.c @@ -833,9 +833,12 @@ static int pci9111_ai_do_cmd(comedi_device * dev, comedi_subdevice * subdevice) plx9050_interrupt_control(dev_private->lcr_io_base, true, true, false, true, true); - dev_private->scan_delay = - (async_cmd->scan_begin_arg / (async_cmd->convert_arg * - async_cmd->chanlist_len)) - 1; + if (async_cmd->scan_begin_src == TRIG_TIMER) { + dev_private->scan_delay = + (async_cmd->scan_begin_arg / + (async_cmd->convert_arg * + async_cmd->chanlist_len)) - 1; + } break; -- 2.26.2