Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337914
b: refs/heads/master
c: 050b3b1
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Nov 15, 2012
1 parent 17fdf48 commit 431567e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 27 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: a48e1258b43fcd00ba0c273cd75c27003191e05e
refs/heads/master: 050b3b1830386e5c8884804b841d4e83c57cf0de
35 changes: 9 additions & 26 deletions trunk/drivers/staging/comedi/drivers/das16m1.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,40 +186,23 @@ static int das16m1_cmd_test(struct comedi_device *dev,
if (err)
return 2;

/* step 3: make sure arguments are trivially compatible */
if (cmd->start_arg != 0) {
cmd->start_arg = 0;
err++;
}
/* Step 3: check if arguments are trivially valid */

if (cmd->scan_begin_src == TRIG_FOLLOW) {
/* internal trigger */
if (cmd->scan_begin_arg != 0) {
cmd->scan_begin_arg = 0;
err++;
}
}
err |= cfc_check_trigger_arg_is(&cmd->start_arg, 0);

if (cmd->convert_src == TRIG_TIMER) {
if (cmd->convert_arg < 1000) {
cmd->convert_arg = 1000;
err++;
}
}
if (cmd->scan_begin_src == TRIG_FOLLOW) /* internal trigger */
err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, 0);

if (cmd->scan_end_arg != cmd->chanlist_len) {
cmd->scan_end_arg = cmd->chanlist_len;
err++;
}
if (cmd->convert_src == TRIG_TIMER)
err |= cfc_check_trigger_arg_min(&cmd->convert_arg, 1000);

err |= cfc_check_trigger_arg_is(&cmd->scan_end_arg, cmd->chanlist_len);

if (cmd->stop_src == TRIG_COUNT) {
/* any count is allowed */
} else {
/* TRIG_NONE */
if (cmd->stop_arg != 0) {
cmd->stop_arg = 0;
err++;
}
err |= cfc_check_trigger_arg_is(&cmd->stop_arg, 0);
}

if (err)
Expand Down

0 comments on commit 431567e

Please sign in to comment.