The COMEDI_CMDTEST ioctl needs to clear unsupported bits in the
struct comedi_cmd's convert_src and other *_src members. This
needs fixing in the pcl816 driver's AI cmdtest.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (!cmd->scan_begin_src || tmp != cmd->scan_begin_src)
err++;
- if (!(cmd->convert_src & (TRIG_EXT | TRIG_TIMER)))
+ tmp = cmd->convert_src;
+ cmd->convert_src &= TRIG_EXT | TRIG_TIMER;
+ if (!cmd->convert_src || tmp != cmd->convert_src)
err++;
tmp = cmd->scan_end_src;