Skip to content

Commit

Permalink
Staging: comedi: pcl816: update convert_src mask for AI cmdtest
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent 48b1aff commit efdf83c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/staging/comedi/drivers/pcl816.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,9 @@ static int pcl816_ai_cmdtest(struct comedi_device *dev,
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;
Expand Down

0 comments on commit efdf83c

Please sign in to comment.