staging: comedi: quatech_daqp_cs: ai async command requires a pacer
The ai (*do_cmd) assumes that either the convert_src is TRIG_TIMER or the scan_begin_src is TRIG_TIMER and always programs the pacer clock with the appropriate trigger argument. Add a Step 2b check to the (*do_cmdtest) to ensure that at least one of the triggers is TRIG_TIMER. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ac315c17f9
commit
0d77ef8b43
1 changed files with 4 additions and 0 deletions
|
|
@ -394,6 +394,10 @@ static int daqp_ai_cmdtest(struct comedi_device *dev,
|
|||
|
||||
/* Step 2b : and mutually compatible */
|
||||
|
||||
/* the async command requires a pacer */
|
||||
if (cmd->scan_begin_src != TRIG_TIMER && cmd->convert_src != TRIG_TIMER)
|
||||
err |= -EINVAL;
|
||||
|
||||
if (err)
|
||||
return 2;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue