Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325154
b: refs/heads/master
c: e990333
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent e8bc123 commit cd66998
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c39eed00cb28d4997ddf3a7aa96a1aff48c8828
refs/heads/master: e990333d11d8d37d802c8c2f22acf1b0461bd7c9
21 changes: 8 additions & 13 deletions trunk/drivers/staging/comedi/drivers/adl_pci9111.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,27 +366,22 @@ static int pci9111_ai_do_cmd_test(struct comedi_device *dev,
if (error)
return 1;

/* step 2 : make sure trigger sources are unique and mutually
* compatible */
/* Step 2a : make sure trigger sources are unique */

if ((cmd->scan_begin_src != TRIG_TIMER) &&
(cmd->scan_begin_src != TRIG_FOLLOW) &&
(cmd->scan_begin_src != TRIG_EXT))
error++;
error |= cfc_check_trigger_is_unique(cmd->scan_begin_src);
error |= cfc_check_trigger_is_unique(cmd->convert_src);
error |= cfc_check_trigger_is_unique(cmd->stop_src);

/* Step 2b : and mutually compatible */

if ((cmd->convert_src != TRIG_TIMER) && (cmd->convert_src != TRIG_EXT))
error++;
if ((cmd->convert_src == TRIG_TIMER) &&
!((cmd->scan_begin_src == TRIG_TIMER) ||
(cmd->scan_begin_src == TRIG_FOLLOW)))
error++;
error |= -EINVAL;
if ((cmd->convert_src == TRIG_EXT) &&
!((cmd->scan_begin_src == TRIG_EXT) ||
(cmd->scan_begin_src == TRIG_FOLLOW)))
error++;

if ((cmd->stop_src != TRIG_COUNT) && (cmd->stop_src != TRIG_NONE))
error++;
error |= -EINVAL;

if (error)
return 2;
Expand Down

0 comments on commit cd66998

Please sign in to comment.